aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-08-19 23:05:04 +0200
committerLudovic Courtès <ludo@gnu.org>2012-08-19 23:05:04 +0200
commitfc484f605cf3fc1be1206bb3d6637d0ca264ddea (patch)
treea54acd643244322e1a4095fa4a5654c99d5a8a76
parent525a59d6d3278f891e19c85cdad96175cffcdef7 (diff)
downloadguix-fc484f605cf3fc1be1206bb3d6637d0ca264ddea.tar
guix-fc484f605cf3fc1be1206bb3d6637d0ca264ddea.tar.gz
build-system/gnu: Augment $PATH with $out for `patch-shebangs'.
* guix/build/gnu-build-system.scm (patch-shebangs): Add BINDIRS to $PATH, and pass that to `patch-shebang'.
-rw-r--r--guix/build/gnu-build-system.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 0a865fca23..72f9536ae8 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -134,11 +134,13 @@
(string-append dir "/sbin"))))
outputs))
- (for-each (lambda (dir)
- (let ((files (list-of-files dir)))
- (for-each patch-shebang files)))
- bindirs)
- #t)
+ (let ((path (append bindirs
+ (search-path-as-string->list (getenv "PATH")))))
+ (for-each (lambda (dir)
+ (let ((files (list-of-files dir)))
+ (for-each (cut patch-shebang <> path) files)))
+ bindirs)
+ #t))
(define %standard-phases
;; Standard build phases, as a list of symbol/procedure pairs.