derivations: 'build-derivations' can be passed derivation inputs.
* guix/derivations.scm (build-derivations): Accept <derivation-input> records among DERIVATIONS. * tests/derivations.scm ("build-derivations with specific output"): Test it.
This commit is contained in:
parent
fd951cd543
commit
7c690a4738
|
@ -1016,6 +1016,11 @@ derivation/output pairs, using the specified MODE."
|
|||
(build-things store (map (match-lambda
|
||||
((? derivation? drv)
|
||||
(derivation-file-name drv))
|
||||
((? derivation-input? input)
|
||||
(cons (derivation-input-path input)
|
||||
(string-join
|
||||
(derivation-input-sub-derivations input)
|
||||
",")))
|
||||
((? string? file) file)
|
||||
(((? derivation? drv) . output)
|
||||
(cons (derivation-file-name drv)
|
||||
|
|
|
@ -807,9 +807,12 @@
|
|||
;; Ask for nothing but the "out" output of DRV.
|
||||
(build-derivations store `((,drv . "out")))
|
||||
|
||||
;; Synonymous:
|
||||
(build-derivations store (list (derivation-input drv '("out"))))
|
||||
|
||||
(valid-path? store out)
|
||||
(equal? (pk 'x content) (pk 'y (call-with-input-file out get-string-all)))
|
||||
)))))
|
||||
(equal? (pk 'x content)
|
||||
(pk 'y (call-with-input-file out get-string-all))))))))
|
||||
|
||||
(test-assert "build-expression->derivation and derivation-build-plan"
|
||||
(let ((drv (build-expression->derivation %store "fail" #f)))
|
||||
|
|
Loading…
Reference in New Issue