Archived
1
0
Fork 0

gexp: 'lower-inputs' uses 'mapm/accumulate-builds'.

This doesn't have an noticeable impact on the run time of
'guix system build desktop.tmp --no-grafts -d'.

* guix/gexp.scm (lower-inputs): Use 'mapm/accumulate-builds' instead of 'mapm'.
This commit is contained in:
Ludovic Courtès 2020-03-25 12:43:49 +01:00
parent 1213ea9bd9
commit 584dfdac37
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -683,22 +683,22 @@ When TARGET is true, use it as the cross-compilation target triplet."
(and (string? obj) (store-path? obj))) (and (string? obj) (store-path? obj)))
(with-monad %store-monad (with-monad %store-monad
(mapm %store-monad (mapm/accumulate-builds
(match-lambda (match-lambda
(((? struct? thing) sub-drv ...) (((? struct? thing) sub-drv ...)
(mlet %store-monad ((obj (lower-object (mlet %store-monad ((obj (lower-object
thing system #:target target))) thing system #:target target)))
(return (match obj (return (match obj
((? derivation? drv) ((? derivation? drv)
(let ((outputs (if (null? sub-drv) (let ((outputs (if (null? sub-drv)
'("out") '("out")
sub-drv))) sub-drv)))
(derivation-input drv outputs))) (derivation-input drv outputs)))
((? store-item? item) ((? store-item? item)
item))))) item)))))
(((? store-item? item)) (((? store-item? item))
(return item))) (return item)))
inputs))) inputs)))
(define* (lower-reference-graphs graphs #:key system target) (define* (lower-reference-graphs graphs #:key system target)
"Given GRAPHS, a list of (FILE-NAME INPUT ...) lists for use as a "Given GRAPHS, a list of (FILE-NAME INPUT ...) lists for use as a