mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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
2 changed files with 10 additions and 2 deletions
|
@ -1016,6 +1016,11 @@ (define* (build-derivations store derivations
|
|||
(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 @@ (define %coreutils
|
|||
;; 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 a new issue