mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
ui: 'show-derivation-outputs' accepts <derivation-input> records.
* guix/ui.scm (show-derivation-outputs): Handle <derivation-input> records.
This commit is contained in:
parent
d38d4ffa10
commit
08c95ba28d
1 changed files with 13 additions and 6 deletions
17
guix/ui.scm
17
guix/ui.scm
|
@ -777,12 +777,19 @@ (define (read/eval-package-expression str)
|
||||||
str))))
|
str))))
|
||||||
|
|
||||||
(define (show-derivation-outputs derivation)
|
(define (show-derivation-outputs derivation)
|
||||||
"Show the output file names of DERIVATION."
|
"Show the output file names of DERIVATION, which can be a derivation or a
|
||||||
|
derivation input."
|
||||||
|
(define (show-outputs derivation outputs)
|
||||||
(format #t "~{~a~%~}"
|
(format #t "~{~a~%~}"
|
||||||
(map (match-lambda
|
(map (cut derivation->output-path derivation <>)
|
||||||
((out-name . out)
|
outputs)))
|
||||||
(derivation->output-path derivation out-name)))
|
|
||||||
(derivation-outputs derivation))))
|
(match derivation
|
||||||
|
((? derivation?)
|
||||||
|
(show-outputs derivation (derivation-output-names derivation)))
|
||||||
|
((? derivation-input? input)
|
||||||
|
(show-outputs (derivation-input-derivation input)
|
||||||
|
(derivation-input-sub-derivations input)))))
|
||||||
|
|
||||||
(define* (check-available-space need
|
(define* (check-available-space need
|
||||||
#:optional (directory (%store-prefix)))
|
#:optional (directory (%store-prefix)))
|
||||||
|
|
Loading…
Reference in a new issue