summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-06-01 21:48:44 +0200
committerLudovic Courtès <ludo@gnu.org>2021-06-04 22:34:31 +0200
commit5b24cbee312586aedbd48fbe13ee14191801f099 (patch)
tree1c8ad4651ca8cc440834e94bbb4da1b17101e861 /guix
parent1dbc3b2b0c514508246b15c0f818fd9736a1e5ef (diff)
downloadguix-patches-5b24cbee312586aedbd48fbe13ee14191801f099.tar
guix-patches-5b24cbee312586aedbd48fbe13ee14191801f099.tar.gz
python-build-system: Look up the interpreter in 'inputs'.
* guix/build/python-build-system.scm (wrap): Pass the shell interpreter from 'inputs' to 'wrap-program' using 'search-input-file'. Partially-Fixes: <https://issues.guix.gnu.org/47869> Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'guix')
-rw-r--r--guix/build/python-build-system.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 5b1339d14c..08871f60cd 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -234,12 +235,18 @@ running checks after installing the package."
(string-append dir "/sbin"))))
outputs))
+ ;; Do not require "bash" to be present in the package inputs
+ ;; even when there is nothing to wrap.
+ ;; Also, calculate (sh) only once to prevent some I/O.
+ (define %sh (delay (search-input-file inputs "bin/bash")))
+ (define (sh) (force %sh))
+
(let* ((var `("GUIX_PYTHONPATH" prefix
,(search-path-as-string->list
(or (getenv "GUIX_PYTHONPATH") "")))))
(for-each (lambda (dir)
(let ((files (list-of-files dir)))
- (for-each (cut wrap-program <> var)
+ (for-each (cut wrap-program <> #:sh (sh) var)
files)))
bindirs)))