@@ -17,6 +17,7 @@
;;; Copyright © 2020 Jesse Gibbons <jgibbons2357+guix@gmail.com>
;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1056,10 +1057,11 @@ environments.")
(setenv "GUILE_AUTO_COMPILE" "0")
#t))
(add-after 'install 'wrap-executable
- (lambda* (#:key inputs outputs target #:allow-other-keys)
+ (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(guile (assoc-ref inputs "guile"))
+ (bash (assoc-ref inputs "bash"))
(version (target-guile-effective-version))
(scm (string-append out "/share/guile/site/" version))
(go (string-append out "/lib/guile/" version "/site-ccache")))
@@ -1079,7 +1081,7 @@ environments.")
,@(if (hurd-target?)
'()
'("guile-fibers")))))
- (wrap-program file
+ (wrap-program file #:sh (string-append bash "/bin/bash")
`("PATH" ":" prefix
(,bin
;; Support building without sqitch as an input, as it
@@ -1104,14 +1106,7 @@ environments.")
(assoc-ref inputs input)
version))
guile-inputs)
- ":"))))
- (when target
- ;; XXX work around wrap-program picking bash for the
- ;; host rather than target
- (let ((bash (assoc-ref inputs "bash")))
- (substitute* file
- (("^#!.*/bash")
- (string-append "#! " bash "/bin/bash")))))))
+ ":"))))))
(find-files bin)))
#t))
(delete 'strip)))) ; As the .go files aren't compatible
@@ -1131,9 +1126,7 @@ environments.")
("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))))
(inputs
`(("guile" ,@(assoc-ref (package-native-inputs guix) "guile"))
- ,@(if (%current-target-system)
- `(("bash" ,bash-minimal))
- '())
+ ("bash" ,bash-minimal) ; for wrap-program
("sqlite" ,sqlite)
,@(if (hurd-target?)
'()