From 5b086540ac7ffbd0d063973de242073dcd869c1f Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Sat, 21 Feb 2026 02:01:43 +0100 Subject: [PATCH] gnu: static-bash-for-glibc: Improve style. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/commencement.scm (static-bash-for-glibc) [inputs]: Drop input labels. [arguments]: Improve style, use G-expressions. <#:configure-flags>: Use search-input-file. Change-Id: I215a0a796fd24e49410c3a517fa49b9b5e58ed66 Signed-off-by: Ludovic Courtès --- gnu/packages/commencement.scm | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 59d3140e13..54d576a6ac 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3125,24 +3125,25 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (package (inherit static-bash) (source (bootstrap-origin (package-source static-bash))) - (inputs `(("gcc" ,gcc-boot0-intermediate-wrapped) - ("libc" ,glibc-final-with-bootstrap-bash) - ("libc:static" ,glibc-final-with-bootstrap-bash "static") - ,@(fold alist-delete (%boot1-inputs) - '("gcc" "libc")))) + (inputs + (cons* gcc-boot0-intermediate-wrapped + glibc-final-with-bootstrap-bash + (list glibc-final-with-bootstrap-bash "static") + (fold delete + (map cadr (%boot1-inputs)) + (list gcc-boot0 glibc-mesboot)))) (arguments - `(#:implicit-inputs? #f - #:guile ,%bootstrap-guile - - ,@(substitute-keyword-arguments arguments - ((#:configure-flags flags #~'()) - ;; Add a '-L' flag so that the pseudo-cross-ld of - ;; BINUTILS-BOOT0 can find libc.a. - #~(append #$flags - (list (string-append "LDFLAGS=-static -L" - (assoc-ref %build-inputs - "libc:static") - "/lib"))))))))) + (append + (list #:implicit-inputs? #f + #:guile %bootstrap-guile) + (substitute-keyword-arguments arguments + ((#:configure-flags flags #~'()) + ;; Add a '-L' flag so that the pseudo-cross-ld of + ;; BINUTILS-BOOT0 can find libc.a. + #~(let ((libc.a (search-input-file %build-inputs "/lib/libc.a"))) + (append #$flags + (list (string-append "LDFLAGS=-static -L" + (dirname libc.a))))))))))) (define gettext-boot0 ;; A minimal gettext used during bootstrap.