Subject: [PATCH core-updates 02/12] gnu-bootstrap: Configure PACKAGE_NAME.

From: Timothy Sample <[email-masked]>
Date: Mon, 14 Mar 2022 16:57:01 -0600

* guix/build/gnu-bootstrap.scm (bootstrap-configure): Add a 'name'
argument and use it to configure the PACKAGE_NAME variable.
* gnu/packages/commencement.scm (bootar, gash-boot,
gash-utils-boot): Use the new argument.
---
 gnu/packages/commencement.scm |  8 +++++---
 guix/build/gnu-bootstrap.scm  | 11 ++++++-----
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 9090fbd44e..644db8cc58 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -120,7 +120,8 @@ (define bootar
                       (guile (string-append guile-dir "/bin/guile")))
                  (invoke guile "--no-auto-compile" source)
                  (chdir "bootar"))))
-           (replace 'configure (bootstrap-configure ,version "." "scripts"))
+           (replace 'configure (bootstrap-configure "Bootar" ,version
+                                                    "." "scripts"))
            (replace 'build (bootstrap-build "."))
            (replace 'install (bootstrap-install "." "scripts"))))))
     (inputs `(("guile" ,%bootstrap-guile)))
@@ -156,7 +157,8 @@ (define gash-boot
          (use-modules (guix build gnu-bootstrap))
          (modify-phases %standard-phases
            (replace 'configure
-             (bootstrap-configure ,(package-version gash) "gash" "scripts"))
+             (bootstrap-configure "Gash" ,(package-version gash)
+                                  "gash" "scripts"))
            (replace 'build (bootstrap-build "gash"))
            (replace 'install (bootstrap-install "gash" "scripts"))
            (add-after 'install 'install-symlinks
@@ -219,7 +221,7 @@ (define gash-utils-boot
                  (("@UTILITY@") "testb"))
                (delete-file "scripts/template.in")))
            (replace 'configure
-             (bootstrap-configure ,(package-version gash-utils)
+             (bootstrap-configure "Gash-Utils" ,(package-version gash-utils)
                                   "gash" "scripts"))
            (replace 'build (bootstrap-build "gash"))
            (replace 'install (bootstrap-install "gash" "scripts"))
diff --git a/guix/build/gnu-bootstrap.scm b/guix/build/gnu-bootstrap.scm
index 1cb9dc5512..7ca6ae8458 100644
--- a/guix/build/gnu-bootstrap.scm
+++ b/guix/build/gnu-bootstrap.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2020 Timothy Sample <[email-masked]>
+;;; Copyright © 2020, 2022 Timothy Sample <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,12 +30,12 @@ (define-module (guix build gnu-bootstrap)
             bootstrap-build
             bootstrap-install))
 
-(define (bootstrap-configure version modules scripts)
+(define (bootstrap-configure name version modules scripts)
   "Create a procedure that configures an early bootstrap package.  The
 procedure will search the MODULES directory and configure all of the
-'.in' files with VERSION.  It will then search the SCRIPTS directory and
-configure all of the '.in' files with the bootstrap Guile and its module
-and object directories."
+'.in' files with NAME and VERSION.  It will then search the SCRIPTS
+directory and configure all of the '.in' files with the bootstrap
+Guile and its module and object directories."
   (lambda* (#:key inputs outputs #:allow-other-keys)
     (let* ((out (assoc-ref outputs "out"))
            (guile-dir (assoc-ref inputs "guile"))
@@ -50,6 +50,7 @@ (define (bootstrap-configure version modules scripts)
                   (let ((target (string-drop-right template 3)))
                     (copy-file template target)
                     (substitute* target
+                      (("@PACKAGE_NAME@") name)
                       (("@VERSION@") version))))
                 (find-files modules
                             (lambda (fn st)
-- 
2.34.0