mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
ui: 'show-what-to-build' accepts derivation inputs.
This is a followup to f8a9f99cd6
.
* guix/ui.scm (show-what-to-build)[inputs]: New variables.
[substitutable-info]: Build the derivation list from INPUTS.
Pass INPUTS to 'derivation-build-plan'.
This commit is contained in:
parent
066eeae1a1
commit
d38d4ffa10
1 changed files with 14 additions and 6 deletions
20
guix/ui.scm
20
guix/ui.scm
|
@ -812,20 +812,28 @@ (define* (show-what-to-build store drv
|
||||||
#:key dry-run? (use-substitutes? #t)
|
#:key dry-run? (use-substitutes? #t)
|
||||||
(mode (build-mode normal)))
|
(mode (build-mode normal)))
|
||||||
"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
|
||||||
derivations listed in DRV using MODE, a 'build-mode' value. Return #t if
|
derivations listed in DRV using MODE, a 'build-mode' value. The elements of
|
||||||
there's something to build, #f otherwise. When USE-SUBSTITUTES?, check and
|
DRV can be either derivations or derivation inputs.
|
||||||
report what is prerequisites are available for download."
|
|
||||||
|
Return #t if there's something to build, #f otherwise. When USE-SUBSTITUTES?,
|
||||||
|
check and report what is prerequisites are available for download."
|
||||||
|
(define inputs
|
||||||
|
(map (match-lambda
|
||||||
|
((? derivation? drv) (derivation-input drv))
|
||||||
|
((? derivation-input? input) input))
|
||||||
|
drv))
|
||||||
|
|
||||||
(define substitutable-info
|
(define substitutable-info
|
||||||
;; Call 'substitutation-oracle' upfront so we don't end up launching the
|
;; Call 'substitutation-oracle' upfront so we don't end up launching the
|
||||||
;; substituter many times. This makes a big difference, especially when
|
;; substituter many times. This makes a big difference, especially when
|
||||||
;; DRV is a long list as is the case with 'guix environment'.
|
;; DRV is a long list as is the case with 'guix environment'.
|
||||||
(if use-substitutes?
|
(if use-substitutes?
|
||||||
(substitution-oracle store drv #:mode mode)
|
(substitution-oracle store (map derivation-input-derivation inputs)
|
||||||
|
#:mode mode)
|
||||||
(const #f)))
|
(const #f)))
|
||||||
|
|
||||||
(let*-values (((build download)
|
(let*-values (((build download)
|
||||||
(derivation-build-plan store
|
(derivation-build-plan store inputs
|
||||||
(map derivation-input drv)
|
|
||||||
#:mode mode
|
#:mode mode
|
||||||
#:substitutable-info
|
#:substitutable-info
|
||||||
substitutable-info))
|
substitutable-info))
|
||||||
|
|
Loading…
Reference in a new issue