From 1dbc3b2b0c514508246b15c0f818fd9736a1e5ef Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 1 Jun 2021 21:47:01 +0200 Subject: [PATCH] glib-or-gtk-build-system: Look up the interpreter in 'inputs'. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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: Signed-off-by: Ludovic Courtès --- guix/build/glib-or-gtk-build-system.scm | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/guix/build/glib-or-gtk-build-system.scm b/guix/build/glib-or-gtk-build-system.scm index ccb3138fe2..8d3c3684d3 100644 --- a/guix/build/glib-or-gtk-build-system.scm +++ b/guix/build/glib-or-gtk-build-system.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Federico Beffa ;;; Copyright © 2014, 2015 Ludovic Courtès ;;; Copyright © 2018 Mark H Weaver +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -136,6 +137,11 @@ (define* (wrap-all-programs #:key inputs outputs 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 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 (match-lambda ((output . directory) @@ -165,36 +171,36 @@ (define handle-output #f))) (cond ((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 gtk-mod-env-var gio-mod-env-var) bin-list)) ((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 gtk-mod-env-var) bin-list)) ((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 gio-mod-env-var) bin-list)) ((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 gtk-mod-env-var) bin-list)) ((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) bin-list)) ((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) bin-list)) ((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) bin-list))))))))