From 92278afdc58430e8e9f6887d481964e1d73e551c Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 31 May 2021 19:21:16 +0200 Subject: [PATCH 06/18] rakudo-build-system: Look up the interpreter in 'inputs'. * guix/build/rakudo-build-system.scm (wrap): Pass the shell interpreter from 'inputs' to 'wrap-program' using 'search-input-file'. Partially-Fixes: --- guix/build/rakudo-build-system.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/guix/build/rakudo-build-system.scm b/guix/build/rakudo-build-system.scm index b2c090f946..5cf1cc55bc 100644 --- a/guix/build/rakudo-build-system.scm +++ b/guix/build/rakudo-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -108,6 +109,12 @@ (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* ((out (assoc-ref outputs "out")) (var `("PERL6LIB" "," prefix ,(cons (string-append out "/share/perl6/lib," @@ -117,7 +124,7 @@ (or (getenv "PERL6LIB") "") #\,))))) (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) #t)) -- 2.31.1