derivations: 'derivation' primitive accepts <derivation> and #:sources.
This brings us closer to the <derivation> data type. * guix/derivations.scm (derivation): Add #:sources parameter. [input->derivation-input]: Add clause for 'derivation-input?'. Honor SOURCES.
This commit is contained in:
parent
456c7ade09
commit
4daf89d619
|
@ -708,7 +708,8 @@ name of each input with that input's hash."
|
||||||
(define* (derivation store name builder args
|
(define* (derivation store name builder args
|
||||||
#:key
|
#:key
|
||||||
(system (%current-system)) (env-vars '())
|
(system (%current-system)) (env-vars '())
|
||||||
(inputs '()) (outputs '("out"))
|
(inputs '()) (sources '())
|
||||||
|
(outputs '("out"))
|
||||||
hash hash-algo recursive?
|
hash hash-algo recursive?
|
||||||
references-graphs
|
references-graphs
|
||||||
allowed-references disallowed-references
|
allowed-references disallowed-references
|
||||||
|
@ -833,6 +834,8 @@ derivation. It is kept as-is, uninterpreted, in the derivation."
|
||||||
|
|
||||||
(define input->derivation-input
|
(define input->derivation-input
|
||||||
(match-lambda
|
(match-lambda
|
||||||
|
((? derivation-input? input)
|
||||||
|
input)
|
||||||
(((? derivation? drv))
|
(((? derivation? drv))
|
||||||
(make-derivation-input drv '("out")))
|
(make-derivation-input drv '("out")))
|
||||||
(((? derivation? drv) sub-drvs ...)
|
(((? derivation? drv) sub-drvs ...)
|
||||||
|
@ -858,7 +861,8 @@ derivation. It is kept as-is, uninterpreted, in the derivation."
|
||||||
hash recursive?)))
|
hash recursive?)))
|
||||||
(sort outputs string<?)))
|
(sort outputs string<?)))
|
||||||
(sources (sort (delete-duplicates
|
(sources (sort (delete-duplicates
|
||||||
(filter-map input->source inputs))
|
(append (filter-map input->source inputs)
|
||||||
|
sources))
|
||||||
string<?))
|
string<?))
|
||||||
(inputs (sort (coalesce-duplicate-inputs
|
(inputs (sort (coalesce-duplicate-inputs
|
||||||
(filter-map input->derivation-input inputs))
|
(filter-map input->derivation-input inputs))
|
||||||
|
|
Loading…
Reference in New Issue