git-download: Honor the ‘GUIX_DOWNLOAD_FALLBACK_TEST’ environment variable.
* guix/git-download.scm (git-fetch): Honor ‘%download-fallback-test’.
This commit is contained in:
parent
811b249397
commit
c7ed1e0160
1 changed files with 6 additions and 1 deletions
|
|
@ -28,6 +28,7 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix modules)
|
#:use-module (guix modules)
|
||||||
#:autoload (guix build-system gnu) (standard-packages)
|
#:autoload (guix build-system gnu) (standard-packages)
|
||||||
|
#:autoload (guix download) (%download-fallback-test)
|
||||||
#:autoload (git bindings) (libgit2-init!)
|
#:autoload (git bindings) (libgit2-init!)
|
||||||
#:autoload (git repository) (repository-open
|
#:autoload (git repository) (repository-open
|
||||||
repository-close!
|
repository-close!
|
||||||
|
|
@ -161,7 +162,11 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f."
|
||||||
;; downloads.
|
;; downloads.
|
||||||
#:script-name "git-download"
|
#:script-name "git-download"
|
||||||
#:env-vars
|
#:env-vars
|
||||||
`(("git url" . ,(git-reference-url ref))
|
`(("git url" . ,(match (%download-fallback-test)
|
||||||
|
('content-addressed-mirrors
|
||||||
|
"https://example.org/does-not-exist")
|
||||||
|
(_
|
||||||
|
(git-reference-url ref))))
|
||||||
("git commit" . ,(git-reference-commit ref))
|
("git commit" . ,(git-reference-commit ref))
|
||||||
("git recursive?" . ,(object->string
|
("git recursive?" . ,(object->string
|
||||||
(git-reference-recursive? ref))))
|
(git-reference-recursive? ref))))
|
||||||
|
|
|
||||||
Reference in a new issue