glib-or-gtk-build-system: Look up the interpreter in 'inputs'.
* guix/build/glib-or-gtk-build-system.scm (wrap-all-programs): 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>
This commit is contained in:
parent
5378edeab4
commit
1dbc3b2b0c
@ -2,6 +2,7 @@
|
|||||||
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
|
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
|
||||||
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
|
||||||
|
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
@ -136,6 +137,11 @@ Wrapping is not applied to outputs whose name is listed in
|
|||||||
GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not
|
GLIB-OR-GTK-WRAP-EXCLUDED-OUTPUTS. This is useful when an output is known not
|
||||||
to contain any GLib or GTK+ binaries, and where wrapping would gratuitously
|
to contain any GLib or GTK+ binaries, and where wrapping would gratuitously
|
||||||
add a dependency of that output on GLib and GTK+."
|
add a dependency of that output on GLib and GTK+."
|
||||||
|
;; 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))
|
||||||
(define handle-output
|
(define handle-output
|
||||||
(match-lambda
|
(match-lambda
|
||||||
((output . directory)
|
((output . directory)
|
||||||
@ -165,36 +171,36 @@ add a dependency of that output on GLib and GTK+."
|
|||||||
#f)))
|
#f)))
|
||||||
(cond
|
(cond
|
||||||
((and data-env-var gtk-mod-env-var gio-mod-env-var)
|
((and data-env-var gtk-mod-env-var gio-mod-env-var)
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
data-env-var
|
data-env-var
|
||||||
gtk-mod-env-var
|
gtk-mod-env-var
|
||||||
gio-mod-env-var)
|
gio-mod-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and data-env-var gtk-mod-env-var (not gio-mod-env-var))
|
((and data-env-var gtk-mod-env-var (not gio-mod-env-var))
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
data-env-var
|
data-env-var
|
||||||
gtk-mod-env-var)
|
gtk-mod-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and data-env-var (not gtk-mod-env-var) gio-mod-env-var)
|
((and data-env-var (not gtk-mod-env-var) gio-mod-env-var)
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
data-env-var
|
data-env-var
|
||||||
gio-mod-env-var)
|
gio-mod-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and (not data-env-var) gtk-mod-env-var gio-mod-env-var)
|
((and (not data-env-var) gtk-mod-env-var gio-mod-env-var)
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
gio-mod-env-var
|
gio-mod-env-var
|
||||||
gtk-mod-env-var)
|
gtk-mod-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var))
|
((and data-env-var (not gtk-mod-env-var) (not gio-mod-env-var))
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
data-env-var)
|
data-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var))
|
((and (not data-env-var) gtk-mod-env-var (not gio-mod-env-var))
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
gtk-mod-env-var)
|
gtk-mod-env-var)
|
||||||
bin-list))
|
bin-list))
|
||||||
((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var)
|
((and (not data-env-var) (not gtk-mod-env-var) gio-mod-env-var)
|
||||||
(for-each (cut wrap-program <>
|
(for-each (cut wrap-program <> #:sh (sh)
|
||||||
gio-mod-env-var)
|
gio-mod-env-var)
|
||||||
bin-list))))))))
|
bin-list))))))))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user