aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm54
1 files changed, 34 insertions, 20 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a475016876..33b957adfe 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -67,6 +67,15 @@
;;; To avoid circular dependencies, this module should not be imported
;;; directly from anywhere.
;;;
+;;; Below, we frequently use "inherit" to create modified packages. The
+;;; reason why we use "inherit" instead of "package/inherit" is because we do
+;;; not want these commencement packages to inherit grafts. By definition,
+;;; these packages are not depended on at run time by any of the packages we
+;;; use. Thus it does not make sense to inherit grafts. Furthermore, those
+;;; grafts would often lead to extra overhead for users who would end up
+;;; downloading those "-boot0" packages just to build package replacements
+;;; that are in fact not going to be used.
+;;;
;;; Code:
(define gnu-make-boot0
@@ -649,27 +658,32 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define glibc-final
;; The final glibc, which embeds the statically-linked Bash built above.
- (package (inherit glibc-final-with-bootstrap-bash)
- (name "glibc")
- (inputs `(("static-bash" ,static-bash-for-glibc)
- ,@(alist-delete
- "static-bash"
- (package-inputs glibc-final-with-bootstrap-bash))))
-
- ;; This time we need 'msgfmt' to install all the libc.mo files.
- (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
- ("gettext" ,gettext-boot0)))
-
- ;; The final libc only refers to itself, but the 'debug' output contains
- ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great
- ;; if 'allowed-references' were per-output.
- (arguments
- `(#:allowed-references
- ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0)
- static-bash-for-glibc
- (package-outputs glibc-final-with-bootstrap-bash))
+ ;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any.
+ (let ((glibc (package-with-bootstrap-guile glibc)))
+ (package/inherit glibc
+ (name "glibc")
+ (inputs `(("static-bash" ,static-bash-for-glibc)
+ ,@(alist-delete
+ "static-bash"
+ (package-inputs glibc-final-with-bootstrap-bash))))
+
+ ;; This time we need 'msgfmt' to install all the libc.mo files.
+ (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
+ ("gettext" ,gettext-boot0)))
+
+ (propagated-inputs
+ (package-propagated-inputs glibc-final-with-bootstrap-bash))
+
+ ;; The final libc only refers to itself, but the 'debug' output contains
+ ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great
+ ;; if 'allowed-references' were per-output.
+ (arguments
+ `(#:allowed-references
+ ,(cons* `(,gcc-boot0 "lib") (kernel-headers-boot0)
+ static-bash-for-glibc
+ (package-outputs glibc-final-with-bootstrap-bash))
- ,@(package-arguments glibc-final-with-bootstrap-bash)))))
+ ,@(package-arguments glibc-final-with-bootstrap-bash))))))
(define gcc-boot0-wrapped
;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the