guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

12/13: Revert "gnu: commencement: Use system in %final-inputs."


From: guix-commits
Subject: 12/13: Revert "gnu: commencement: Use system in %final-inputs."
Date: Tue, 22 Aug 2023 15:44:25 -0400 (EDT)

janneke pushed a commit to branch hurd-team
in repository guix.

commit f54ada965c530d933db394a0ec9f16a07b4208e8
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Aug 20 09:27:49 2023 +0200

    Revert "gnu: commencement: Use system in %final-inputs."
    
    Avoid word-rebuild for now
    
    This reverts commit 560cb51e7b37e2c6f6fe4b72a3781185c57fdf83.
---
 gnu/ci.scm                    | 46 ++++++++++++++++++--------------------
 gnu/packages/base.scm         |  7 +++---
 gnu/packages/commencement.scm | 51 +++++++++++++++++++++----------------------
 3 files changed, 49 insertions(+), 55 deletions(-)

diff --git a/gnu/ci.scm b/gnu/ci.scm
index 520ac28110..683d338121 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -24,7 +24,6 @@
   #:use-module (guix build-system channel)
   #:use-module (guix config)
   #:autoload   (guix describe) (package-channels)
-  #:use-module (guix memoization)
   #:use-module (guix store)
   #:use-module (guix profiles)
   #:use-module (guix packages)
@@ -343,32 +342,29 @@ otherwise use the IMAGE name."
   ;; Return the name of a package's job.
   package-name)
 
-(define base-packages
-  (mlambda (system)
-    "Return the set of packages considered to be part of the base for SYSTEM."
-    (delete-duplicates
-     (append-map (match-lambda
-                   ((_ package _ ...)
-                    (match (package-transitive-inputs package)
-                      (((_ inputs _ ...) ...)
-                       inputs))))
-                 (%final-inputs system)))))
-
 (define package->job
-  (lambda* (store package system #:key (suffix ""))
-    "Return a job for PACKAGE on SYSTEM, or #f if this combination is not
+  (let ((base-packages
+         (delete-duplicates
+          (append-map (match-lambda
+                        ((_ package _ ...)
+                         (match (package-transitive-inputs package)
+                           (((_ inputs _ ...) ...)
+                            inputs))))
+                      (%final-inputs)))))
+    (lambda* (store package system #:key (suffix ""))
+      "Return a job for PACKAGE on SYSTEM, or #f if this combination is not
 valid.  Append SUFFIX to the job name."
-    (cond ((member package (base-packages system))
-           (package-job store (string-append "base." (job-name package))
-                        package system #:suffix suffix))
-          ((supported-package? package system)
-           (let ((drv (package-derivation store package system
-                                          #:graft? #f)))
-             (and (substitutable-derivation? drv)
-                  (package-job store (job-name package)
-                               package system #:suffix suffix))))
-          (else
-           #f))))
+      (cond ((member package base-packages)
+             (package-job store (string-append "base." (job-name package))
+                          package system #:suffix suffix))
+            ((supported-package? package system)
+             (let ((drv (package-derivation store package system
+                                            #:graft? #f)))
+               (and (substitutable-derivation? drv)
+                    (package-job store (job-name package)
+                                 package system #:suffix suffix))))
+            (else
+             #f)))))
 
 (define %x86-64-micro-architectures
   ;; Micro-architectures for which we build tuned variants.
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 24c18380ae..8cf2682fac 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -80,8 +80,7 @@
             libc-locales-for-target
             libc-utf8-locales-for-target
             make-ld-wrapper
-            libiconv-if-needed
-            %final-inputs))
+            libiconv-if-needed))
 
 ;;; Commentary:
 ;;;
@@ -1676,10 +1675,10 @@ package needs iconv ,@(libiconv-if-needed) should be 
added."
          (proc  (module-ref iface 'canonical-package)))
     (proc package)))
 
-(define* (%final-inputs #:optional (system (%current-system)))
+(define-public (%final-inputs)
   "Return the list of \"final inputs\"."
   ;; Avoid circular dependency by lazily resolving 'commencement'.
   (let ((iface (resolve-interface '(gnu packages commencement))))
-    ((module-ref iface '%final-inputs) system)))
+    ((module-ref iface '%final-inputs) (%current-system))))
 
 ;;; base.scm ends here
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e522e70444..fe6f025257 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3459,32 +3459,31 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker 
-Wl,~a/~a \"$@\"~%"
     ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are
     ;; used for origins that have patches, thereby avoiding circular
     ;; dependencies.
-    (parameterize ((%current-system system))
-      (let ((finalize (compose with-boot6
-                               package-with-bootstrap-guile)))
-        `(,@(map (match-lambda
-                   ((name package)
-                    (list name (finalize package))))
-                 `(("tar" ,tar)
-                   ("gzip" ,gzip)
-                   ("bzip2" ,bzip2)
-                   ("file" ,file)
-                   ("diffutils" ,diffutils)
-                   ("patch" ,patch)
-                   ("findutils" ,findutils)
-                   ("gawk" ,gawk)))
-          ("sed" ,sed-final)
-          ("grep" ,grep-final)
-          ("xz" ,xz-final)
-          ("coreutils" ,coreutils-final)
-          ("make" ,gnu-make-final)
-          ("bash" ,bash-final)
-          ("ld-wrapper" ,ld-wrapper)
-          ("binutils" ,binutils-final)
-          ("gcc" ,gcc-final)
-          ("libc" ,glibc-final)
-          ("libc:static" ,glibc-final "static")
-          ("locales" ,glibc-utf8-locales-final))))))
+    (let ((finalize (compose with-boot6
+                             package-with-bootstrap-guile)))
+      `(,@(map (match-lambda
+                 ((name package)
+                  (list name (finalize package))))
+               `(("tar" ,tar)
+                 ("gzip" ,gzip)
+                 ("bzip2" ,bzip2)
+                 ("file" ,file)
+                 ("diffutils" ,diffutils)
+                 ("patch" ,patch)
+                 ("findutils" ,findutils)
+                 ("gawk" ,gawk)))
+        ("sed" ,sed-final)
+        ("grep" ,grep-final)
+        ("xz" ,xz-final)
+        ("coreutils" ,coreutils-final)
+        ("make" ,gnu-make-final)
+        ("bash" ,bash-final)
+        ("ld-wrapper" ,ld-wrapper)
+        ("binutils" ,binutils-final)
+        ("gcc" ,gcc-final)
+        ("libc" ,glibc-final)
+        ("libc:static" ,glibc-final "static")
+        ("locales" ,glibc-utf8-locales-final)))))
 
 (define-public canonical-package
   (let ((name->package (mlambda (system)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]