profiles: Get rid of the 'inputs' field of 'manifest-entry'.
* guix/profiles.scm (<manifest-entry>)[inputs]: Remove. (profile-derivation): Rely on 'item' and 'deps' instead of 'inputs'. Adjust 'builder' accordingly. * guix/scripts/package.scm (options->installable)[package->manifest-entry]: Remove 'inputs' field. Change 'dependencies' field to contain packages.
This commit is contained in:
parent
a54c94a40d
commit
4ca0b4101d
|
@ -86,10 +86,8 @@
|
||||||
(output manifest-entry-output ; string
|
(output manifest-entry-output ; string
|
||||||
(default "out"))
|
(default "out"))
|
||||||
(item manifest-entry-item) ; package | store path
|
(item manifest-entry-item) ; package | store path
|
||||||
(dependencies manifest-entry-dependencies ; list of store paths
|
(dependencies manifest-entry-dependencies ; (store path | package)*
|
||||||
(default '()))
|
(default '())))
|
||||||
(inputs manifest-entry-inputs ; list of inputs to build
|
|
||||||
(default '()))) ; this entry
|
|
||||||
|
|
||||||
(define-record-type* <manifest-pattern> manifest-pattern
|
(define-record-type* <manifest-pattern> manifest-pattern
|
||||||
make-manifest-pattern
|
make-manifest-pattern
|
||||||
|
@ -210,11 +208,11 @@ the given MANIFEST."
|
||||||
(define inputs
|
(define inputs
|
||||||
(append-map (match-lambda
|
(append-map (match-lambda
|
||||||
(($ <manifest-entry> name version
|
(($ <manifest-entry> name version
|
||||||
output path deps (inputs ..1))
|
output (? package? package) deps)
|
||||||
inputs)
|
`((,package ,output) ,@deps))
|
||||||
(($ <manifest-entry> name version output path deps)
|
(($ <manifest-entry> name version output path deps)
|
||||||
;; Assume PATH and DEPS are already valid.
|
;; Assume PATH and DEPS are already valid.
|
||||||
`((,name ,path) ,@deps)))
|
`(,path ,@deps)))
|
||||||
(manifest-entries manifest)))
|
(manifest-entries manifest)))
|
||||||
|
|
||||||
(define builder
|
(define builder
|
||||||
|
@ -225,17 +223,11 @@ the given MANIFEST."
|
||||||
(setvbuf (current-output-port) _IOLBF)
|
(setvbuf (current-output-port) _IOLBF)
|
||||||
(setvbuf (current-error-port) _IOLBF)
|
(setvbuf (current-error-port) _IOLBF)
|
||||||
|
|
||||||
(let ((inputs '#$(map (match-lambda
|
(union-build #$output '#$inputs
|
||||||
((label thing)
|
|
||||||
thing)
|
|
||||||
((label thing output)
|
|
||||||
`(,thing ,output)))
|
|
||||||
inputs)))
|
|
||||||
(union-build #$output inputs
|
|
||||||
#:log-port (%make-void-port "w"))
|
#:log-port (%make-void-port "w"))
|
||||||
(call-with-output-file (string-append #$output "/manifest")
|
(call-with-output-file (string-append #$output "/manifest")
|
||||||
(lambda (p)
|
(lambda (p)
|
||||||
(pretty-print '#$(manifest->gexp manifest) p))))))
|
(pretty-print '#$(manifest->gexp manifest) p)))))
|
||||||
|
|
||||||
(gexp->derivation "profile" builder
|
(gexp->derivation "profile" builder
|
||||||
#:modules '((guix build union))
|
#:modules '((guix build union))
|
||||||
|
|
|
@ -647,15 +647,18 @@ return the new list of manifest entries."
|
||||||
;; When given a package via `-e', install the first of its
|
;; When given a package via `-e', install the first of its
|
||||||
;; outputs (XXX).
|
;; outputs (XXX).
|
||||||
(let* ((output (or output (car (package-outputs p))))
|
(let* ((output (or output (car (package-outputs p))))
|
||||||
(deps (deduplicate (package-transitive-propagated-inputs p))))
|
(deps (map (match-lambda
|
||||||
|
((label package)
|
||||||
|
`(,package "out"))
|
||||||
|
((label package output)
|
||||||
|
`(,package ,output)))
|
||||||
|
(package-transitive-propagated-inputs p))))
|
||||||
(manifest-entry
|
(manifest-entry
|
||||||
(name (package-name p))
|
(name (package-name p))
|
||||||
(version (package-version p))
|
(version (package-version p))
|
||||||
(output output)
|
(output output)
|
||||||
(item p)
|
(item p)
|
||||||
(dependencies deps)
|
(dependencies (delete-duplicates deps)))))
|
||||||
(inputs (cons (list (package-name p) p output)
|
|
||||||
deps)))))
|
|
||||||
|
|
||||||
(define upgrade-regexps
|
(define upgrade-regexps
|
||||||
(filter-map (match-lambda
|
(filter-map (match-lambda
|
||||||
|
|
Loading…
Reference in New Issue