guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit 36476545bd63c0d6b999fc7cba381025f563d51b
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Feb 17 14:24:04 2026 +0100

    gnu: glibc-mesboot0: Improve style.
    
    * gnu/packages/commencement.scm (glibc-mesboot0)[arguments]
    <#:make-flags, #:configure-flags, #:phases>: Improve style, use
    G-expressions and search-input-file.  In phase 'fixup-configure, drop
    duplicate string substitution.
    
    Change-Id: If2f08e5c776384d77182180ca8992fa67bf0a235
    Signed-off-by: Ludovic Courtès <[email protected]>
---
 gnu/packages/commencement.scm | 131 ++++++++++++++++++++----------------------
 1 file changed, 63 insertions(+), 68 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ae2642de4ef..450ddc3e3fe 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1118,74 +1118,69 @@ ac_cv_c_float_format='IEEE (little-endian)'
                      ,@(%boot-mesboot-core-inputs)))
     (outputs '("out"))
     (arguments
-     (list #:implicit-inputs? #f
-           #:guile %bootstrap-guile
-           #:tests? #f
-           #:strip-binaries? #f
-           #:validate-runpath? #f   ; no dynamic executables
-           #:parallel-build? #f     ; gcc-2.95.3 ICEs on massively parallel 
builds
-           #:make-flags #~(list (string-append
-                                 "SHELL="
-                                 (assoc-ref %build-inputs "bash")
-                                 "/bin/sh"))
-           #:configure-flags
-           #~(let ((out (assoc-ref %outputs "out"))
-                   (headers (assoc-ref %build-inputs "headers")))
-               `("--disable-shared"
-                 "--enable-static"
-                 "--disable-sanity-checks"
-                 "--build=i686-unknown-linux-gnu"
-                 "--host=i686-unknown-linux-gnu"
-                 ,(string-append "--with-headers=" headers "/include")
-                 "--enable-static-nss"
-                 "--without-__thread"
-                 "--without-cvs"
-                 "--without-gd"
-                 "--without-tls"
-                 ,(string-append "--prefix=" out)))
-           #:phases
-           #~(modify-phases %standard-phases
-               (add-after 'unpack 'apply-boot-patch
-                 (lambda* (#:key inputs #:allow-other-keys)
-                   (invoke "patch" "--force" "-p1" "-i"
-                           #$(local-file
-                              (search-patch "glibc-boot-2.2.5.patch")))
-                   (invoke "patch" "--force" "-p1" "-i"
-                           #$(local-file
-                              (search-patch 
"glibc-bootstrap-system-2.2.5.patch")))))
-               (add-before 'configure 'setenv
-                 (lambda* (#:key outputs #:allow-other-keys)
-                   (let* ((out (assoc-ref outputs "out"))
-                          (bash (assoc-ref %build-inputs "bash"))
-                          (shell (string-append bash "/bin/bash"))
-                          (gcc (assoc-ref %build-inputs "gcc"))
-                          (headers (assoc-ref %build-inputs "headers"))
-                          (cppflags (string-append
-                                     ;;" -D __STDC__=1"
-                                     " -D MES_BOOTSTRAP=1"
-                                     " -D BOOTSTRAP_GLIBC=1"))
-                          (cflags (string-append " -L " (getcwd))))
-                     (setenv "CONFIG_SHELL" shell)
-                     (setenv "SHELL" shell)
-                     (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
-                     (setenv "CC" (string-append gcc "/bin/gcc " cppflags 
cflags)))))
-               (replace 'configure           ; needs classic invocation of 
configure
-                 (lambda* (#:key configure-flags #:allow-other-keys)
-                   (format (current-error-port)
-                           "running ./configure ~a\n" (string-join 
configure-flags))
-                   (apply invoke "./configure" configure-flags)))
-               (add-after 'configure 'fixup-configure
-                 (lambda _
-                   (let* ((out (assoc-ref %outputs "out"))
-                          (bash (assoc-ref %build-inputs "bash"))
-                          (shell (string-append bash "/bin/bash")))
-                     (substitute* "config.make"
-                       (("INSTALL = scripts/") "INSTALL = $(..)./scripts/"))
-                     (substitute* "config.make"
-                       (("INSTALL = scripts/") "INSTALL = $(..)./scripts/")
-                       (("BASH = ") (string-append
-                                     "SHELL = " shell "
-         BASH = ")))))))))))
+     (list
+      #:implicit-inputs? #f
+      #:guile %bootstrap-guile
+      #:tests? #f
+      #:strip-binaries? #f
+      #:validate-runpath? #f   ; no dynamic executables
+      #:parallel-build? #f     ; gcc-2.95.3 ICEs on massively parallel builds
+      #:make-flags
+      #~(list (string-append "SHELL="
+                             (search-input-file %build-inputs "/bin/sh")))
+      #:configure-flags
+      #~(let ((kernel-headers (search-input-directory %build-inputs
+                                                      #$(if (system-hurd?)
+                                                            "include/mach"
+                                                            "include/linux"))))
+          (list "--disable-shared"
+                "--enable-static"
+                "--disable-sanity-checks"
+                "--build=i686-unknown-linux-gnu"
+                "--host=i686-unknown-linux-gnu"
+                (string-append "--with-headers=" (dirname kernel-headers))
+                "--enable-static-nss"
+                "--without-__thread"
+                "--without-cvs"
+                "--without-gd"
+                "--without-tls"
+                (string-append "--prefix=" #$output)))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'apply-boot-patch
+            (lambda* (#:key inputs #:allow-other-keys)
+              (invoke "patch" "--force" "-p1" "-i"
+                      #$(local-file
+                         (search-patch "glibc-boot-2.2.5.patch")))
+              (invoke "patch" "--force" "-p1" "-i"
+                      #$(local-file
+                         (search-patch 
"glibc-bootstrap-system-2.2.5.patch")))))
+          (add-before 'configure 'setenv
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((bash (search-input-file inputs "/bin/bash"))
+                    (gcc (search-input-file inputs "/bin/gcc"))
+                    (cppflags (string-append
+                               ;;" -D __STDC__=1"
+                               " -D MES_BOOTSTRAP=1"
+                               " -D BOOTSTRAP_GLIBC=1"))
+                    (cflags (string-append " -L " (getcwd))))
+                (setenv "CONFIG_SHELL" bash)
+                (setenv "SHELL" bash)
+                (setenv "CPP" (string-append gcc " -E " cppflags))
+                (setenv "CC" (string-append gcc " " cppflags cflags)))))
+          (replace 'configure           ; needs classic invocation of configure
+            (lambda* (#:key configure-flags #:allow-other-keys)
+              (format (current-error-port)
+                      "running ./configure ~a\n" (string-join configure-flags))
+              (apply invoke "./configure" configure-flags)))
+          (add-after 'configure 'fixup-configure
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((bash (search-input-file inputs "/bin/bash")))
+                (substitute* "config.make"
+                  (("INSTALL = scripts/")
+                   "INSTALL = $(..)./scripts/")
+                  (("BASH = ")
+                   (string-append "SHELL = " bash "\nBASH = ")))))))))))
 
 (define gcc-mesboot0
   (package

Reply via email to