ui: Add 'show-derivation-outputs'.
* guix/scripts/build.scm (guix-build): Extract code from here and move to... * guix/ui.scm (show-derivation-outputs): ... here. New procedure.master
parent
88981dd3e2
commit
fa394eb99c
|
@ -538,14 +538,7 @@ arguments with packages that use the specified source."
|
||||||
roots))
|
roots))
|
||||||
((not (assoc-ref opts 'dry-run?))
|
((not (assoc-ref opts 'dry-run?))
|
||||||
(and (build-derivations store drv)
|
(and (build-derivations store drv)
|
||||||
(for-each (lambda (d)
|
(for-each show-derivation-outputs drv)
|
||||||
(format #t "~{~a~%~}"
|
|
||||||
(map (match-lambda
|
|
||||||
((out-name . out)
|
|
||||||
(derivation->output-path
|
|
||||||
d out-name)))
|
|
||||||
(derivation-outputs d))))
|
|
||||||
drv)
|
|
||||||
(for-each (cut register-root store <> <>)
|
(for-each (cut register-root store <> <>)
|
||||||
(map (lambda (drv)
|
(map (lambda (drv)
|
||||||
(map cdr
|
(map cdr
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
show-bug-report-information
|
show-bug-report-information
|
||||||
string->number*
|
string->number*
|
||||||
size->number
|
size->number
|
||||||
|
show-derivation-outputs
|
||||||
show-what-to-build
|
show-what-to-build
|
||||||
show-what-to-build*
|
show-what-to-build*
|
||||||
show-manifest-transaction
|
show-manifest-transaction
|
||||||
|
@ -502,6 +503,14 @@ error."
|
||||||
(leave (_ "expression ~s does not evaluate to a package~%")
|
(leave (_ "expression ~s does not evaluate to a package~%")
|
||||||
str))))
|
str))))
|
||||||
|
|
||||||
|
(define (show-derivation-outputs derivation)
|
||||||
|
"Show the output file names of DERIVATION."
|
||||||
|
(format #t "~{~a~%~}"
|
||||||
|
(map (match-lambda
|
||||||
|
((out-name . out)
|
||||||
|
(derivation->output-path derivation out-name)))
|
||||||
|
(derivation-outputs derivation))))
|
||||||
|
|
||||||
(define* (show-what-to-build store drv
|
(define* (show-what-to-build store drv
|
||||||
#:key dry-run? (use-substitutes? #t))
|
#:key dry-run? (use-substitutes? #t))
|
||||||
"Show what will or would (depending on DRY-RUN?) be built in realizing the
|
"Show what will or would (depending on DRY-RUN?) be built in realizing the
|
||||||
|
|
Loading…
Reference in New Issue