mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
gnu: Remove '%final-inputs' references at the top level.
Due to circular dependencies, referring to bindings exported by other modules from the top level is frowned upon. This patch addresses one of the remaining cases. * gnu/packages/base.scm (%final-inputs): New procedure. * gnu/packages/cross-base.scm: Remove (gnu packages commencement) import. (cross-gcc): Use the new '%final-inputs'. * gnu/packages/make-bootstrap.scm: Remove (gnu packages commencement) import. (package-with-relocatable-glibc): Use the new '%final-inputs'.
This commit is contained in:
parent
8af47ef603
commit
fb77c61422
3 changed files with 10 additions and 6 deletions
|
@ -1003,4 +1003,10 @@ (define-public (canonical-package package)
|
|||
(proc (module-ref iface 'canonical-package)))
|
||||
(proc package)))
|
||||
|
||||
(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)))
|
||||
|
||||
;;; base.scm ends here
|
||||
|
|
|
@ -23,7 +23,6 @@ (define-module (gnu packages cross-base)
|
|||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages commencement)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
|
@ -257,11 +256,11 @@ (define* (cross-gcc target
|
|||
|
||||
;; Call it differently so that the builder can check whether the "libc"
|
||||
;; input is #f.
|
||||
("libc-native" ,@(assoc-ref %final-inputs "libc"))
|
||||
("libc-native" ,@(assoc-ref (%final-inputs) "libc"))
|
||||
|
||||
;; Remaining inputs.
|
||||
,@(let ((inputs (append (package-inputs %xgcc)
|
||||
(alist-delete "libc" %final-inputs))))
|
||||
(alist-delete "libc" (%final-inputs)))))
|
||||
(if libc
|
||||
`(("libc" ,libc)
|
||||
("xkernel-headers" ;the target headers
|
||||
|
|
|
@ -23,7 +23,6 @@ (define-module (gnu packages make-bootstrap)
|
|||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module ((gnu packages) #:select (search-patch))
|
||||
#:use-module ((gnu packages commencement) #:select (%final-inputs))
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages cross-base)
|
||||
#:use-module (gnu packages bash)
|
||||
|
@ -101,14 +100,14 @@ (define (native-inputs)
|
|||
(cross-binutils target)
|
||||
(cross-bootstrap-libc)))
|
||||
("cross-binutils" ,(cross-binutils target))
|
||||
,@%final-inputs))
|
||||
,@(%final-inputs)))
|
||||
`(("libc" ,(glibc-for-bootstrap))
|
||||
("gcc" ,(package (inherit gcc)
|
||||
(outputs '("out")) ; all in one so libgcc_s is easily found
|
||||
(inputs
|
||||
`(("libc",(glibc-for-bootstrap))
|
||||
,@(package-inputs gcc)))))
|
||||
,@(fold alist-delete %final-inputs '("libc" "gcc")))))
|
||||
,@(fold alist-delete (%final-inputs) '("libc" "gcc")))))
|
||||
|
||||
(package-with-explicit-inputs p inputs
|
||||
(current-source-location)
|
||||
|
|
Loading…
Reference in a new issue