aboutsummaryrefslogtreecommitdiff
path: root/guix/scripts/perform-download.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-10-05 14:37:13 +0200
committerLudovic Courtès <ludo@gnu.org>2023-10-05 23:14:53 +0200
commit762fdbdef52b4c17df578478cadc8655d56171a4 (patch)
treeb015105d4b2d6927d770cbc315c8b2397365a129 /guix/scripts/perform-download.scm
parentefab2a25be4afe49a3ef5d48971e8091bc35797a (diff)
downloadguix-762fdbdef52b4c17df578478cadc8655d56171a4.tar
guix-762fdbdef52b4c17df578478cadc8655d56171a4.tar.gz
perform-download: Set PATH before invoking ‘git’.
Fixes <https://issues.guix.gnu.org/66305>. Reported by Guillaume Le Vaillant <glv@posteo.net>. * guix/scripts/perform-download.scm (perform-git-download): Add call to ‘setenv’.
Diffstat (limited to 'guix/scripts/perform-download.scm')
-rw-r--r--guix/scripts/perform-download.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/scripts/perform-download.scm b/guix/scripts/perform-download.scm
index 045dd84ad6..9aa0e61e9d 100644
--- a/guix/scripts/perform-download.scm
+++ b/guix/scripts/perform-download.scm
@@ -108,6 +108,12 @@ Note: OUTPUT may differ from the 'out' value of DRV, notably for 'bmCheck' or
(drv-output (assoc-ref (derivation-outputs drv) "out"))
(algo (derivation-output-hash-algo drv-output))
(hash (derivation-output-hash drv-output)))
+ ;; Commands such as 'git submodule' expect Coreutils and sed (among
+ ;; others) to be in $PATH. The 'git' package in Guix should address it
+ ;; with wrappers but packages on other distros such as Debian may rely
+ ;; on ambient authority, hence the PATH value below.
+ (setenv "PATH" "/run/current-system/profile/bin:/bin:/usr/bin")
+
(git-fetch-with-fallback url commit output
#:recursive? recursive?
#:git-command %git))))