summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-21 10:42:32 +0100
committerGuix Patches Tester <>2024-04-21 11:53:19 +0200
commit1167431c87cf6f0f9d0cbc91078c41a499408c62 (patch)
tree7d20f173f3a5b7f443e5f541638fa321e19dd830
parent9676d5d868dfdf3ab922ff4996d2b4f5b1b23c99 (diff)
downloadguix-patches-1167431c87cf6f0f9d0cbc91078c41a499408c62.tar
guix-patches-1167431c87cf6f0f9d0cbc91078c41a499408c62.tar.gz
scripts: perform-download: Support configuring the %store-prefix.
* guix/scripts/perform-download.scm (guix-perform-download): Use GUIX_STORE_DIRECTORY from the environment if it's set, as this allows using the perform-download script with a non-default store directory. Change-Id: Id96bb901a106e1b13be5b21b3ce436c680c616a2
-rw-r--r--guix/scripts/perform-download.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm
index 5079d0ea71..f7f5231f27 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -20,7 +20,8 @@
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix derivations)
- #:use-module ((guix store) #:select (derivation-path? store-path?))
+ #:use-module ((guix store) #:select (%store-prefix derivation-path?
+ store-path?))
#:autoload (guix build download) (%download-methods url-fetch)
#:autoload (guix build git) (git-fetch-with-fallback)
#:autoload (guix config) (%git)
@@ -153,6 +154,9 @@ Note: OUTPUT may differ from the 'out' value of DRV, notably for 'bmCheck' or
(#f #f)
(str (string-contains str "print-extended-build-trace=1"))))
+ (and=> (getenv "GUIX_STORE_DIRECTORY")
+ %store-prefix)
+
;; This program must be invoked by guix-daemon under an unprivileged UID to
;; prevent things downloading from 'file:///etc/shadow' or arbitrary code
;; execution via the content-addressed mirror procedures. (That means we