diff options
-rw-r--r-- | gnu/packages/commencement.scm | 74 |
1 files changed, 40 insertions, 34 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index d113acaba8..fd976e0c2f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2365,14 +2365,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" `(("bash" ,bash-final) ,@(alist-delete "bash" (%boot3-inputs)))) +(define with-boot4 + (package-with-explicit-inputs %boot4-inputs %bootstrap-guile)) + (define-public guile-final ;; This package must be public because other modules refer to it. However, ;; mark it as hidden so that 'fold-packages' ignores it. - (package-with-bootstrap-guile - (package-with-explicit-inputs (hidden-package guile-2.2/fixed) - %boot4-inputs - (current-source-location) - #:guile %bootstrap-guile))) + (with-boot4 (hidden-package + (package-with-bootstrap-guile guile-2.2/fixed)))) (define glibc-utf8-locales-final ;; Now that we have GUILE-FINAL, build the UTF-8 locales. They are needed @@ -2384,10 +2384,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (inherit glibc-utf8-locales) (native-inputs `(("glibc" ,glibc-final) - ("gzip" - ,(package-with-explicit-inputs gzip %boot4-inputs - (current-source-location) - #:guile %bootstrap-guile)))))) + ("gzip" ,(with-boot4 gzip)))))) (define-public ld-wrapper ;; The final 'ld' wrapper, which uses the final Guile and Binutils. @@ -2403,35 +2400,45 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" `(("locales" ,glibc-utf8-locales-final) ,@(%boot4-inputs))) +(define with-boot5 + (package-with-explicit-inputs %boot5-inputs)) + (define gnu-make-final ;; The final GNU Make, which uses the final Guile. - (package-with-explicit-inputs (package-with-bootstrap-guile gnu-make) - (lambda _ - `(("guile" ,guile-final) - ,@(%boot5-inputs))) - (current-source-location))) + ;; FIXME: This is a mistake: we shouldn't be propagating GUILE-FINAL to + ;; PKG-CONFIG. + ;; TODO: Fix that on the next rebuild cycle. + (let ((pkg-config (package + (inherit pkg-config) + (inputs `(("guile" ,guile-final) + ,@(%boot5-inputs))) + (arguments + `(#:implicit-inputs? #f + ,@(package-arguments pkg-config)))))) + (package + (inherit (package-with-bootstrap-guile gnu-make)) + (inputs `(("guile" ,guile-final) + ,@(%boot5-inputs))) + (native-inputs `(("pkg-config" ,pkg-config))) + (arguments + `(#:implicit-inputs? #f + ,@(package-arguments gnu-make)))))) + (define coreutils-final ;; The final Coreutils. Treat them specially because some packages, such as ;; Findutils, keep a reference to the Coreutils they were built with. - (package-with-explicit-inputs (package-with-bootstrap-guile coreutils) - %boot5-inputs - (current-source-location) - - ;; Use the final Guile, linked against the - ;; final libc with working iconv, so that - ;; 'substitute*' works well when touching - ;; test files in Gettext. - #:guile guile-final)) + (with-boot5 (package-with-bootstrap-guile coreutils) + ;; Use the final Guile, linked against the + ;; final libc with working iconv, so that + ;; 'substitute*' works well when touching + ;; test files in Gettext. + )) (define grep-final ;; The final grep. Gzip holds a reference to it (via zgrep), so it must be ;; built before gzip. - (let ((grep (package-with-explicit-inputs - (package-with-bootstrap-guile grep) - %boot5-inputs - (current-source-location) - #:guile guile-final))) + (let ((grep (with-boot5 (package-with-bootstrap-guile grep)))) (package/inherit grep (inputs (alist-delete "pcre" (package-inputs grep))) (native-inputs `(("perl" ,perl-boot0)))))) @@ -2442,12 +2449,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ("grep" ,grep-final) ,@(%boot5-inputs))) +(define with-boot6 + (package-with-explicit-inputs %boot6-inputs)) + (define sed-final ;; The final sed. - (let ((sed (package-with-explicit-inputs (package-with-bootstrap-guile sed) - %boot6-inputs - (current-source-location) - #:guile guile-final))) + (let ((sed (with-boot6 (package-with-bootstrap-guile sed)))) (package/inherit sed (native-inputs `(("perl" ,perl-boot0)))))) (define-public %final-inputs @@ -2455,8 +2462,7 @@ 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. - (let ((finalize (compose (cut package-with-explicit-inputs <> %boot6-inputs - (current-source-location)) + (let ((finalize (compose with-boot6 package-with-bootstrap-guile))) `(,@(map (match-lambda ((name package) |