ui: 'show-derivation-outputs' accepts <derivation-input> records.

* guix/ui.scm (show-derivation-outputs): Handle <derivation-input>
records.
This commit is contained in:
Ludovic Courtès 2019-06-23 18:46:53 +02:00
parent d38d4ffa10
commit 08c95ba28d
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 13 additions and 6 deletions

View File

@ -777,12 +777,19 @@ error."
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
(format #t "~{~a~%~}" derivation input."
(map (match-lambda (define (show-outputs derivation outputs)
((out-name . out) (format #t "~{~a~%~}"
(derivation->output-path derivation out-name))) (map (cut derivation->output-path derivation <>)
(derivation-outputs derivation)))) outputs)))
(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)))