derivations: Introduce 'imported+compiled-modules'.
* guix/derivations.scm (imported+compiled-modules): New procedure. (build-expression->derivation): Use it instead of separate calls to '%imported-modules' and '%compiled-modules'.
This commit is contained in:
parent
6d18427fa5
commit
cf7648f882
1 changed files with 15 additions and 8 deletions
|
|
@ -1207,6 +1207,14 @@ they can refer to each other."
|
||||||
#:guile-for-build guile
|
#:guile-for-build guile
|
||||||
#:local-build? #t)))
|
#:local-build? #t)))
|
||||||
|
|
||||||
|
(define* (imported+compiled-modules store modules #:key
|
||||||
|
(system (%current-system))
|
||||||
|
(guile (%guile-for-build)))
|
||||||
|
"Return a pair containing the derivation to import MODULES and that where
|
||||||
|
MODULES are compiled."
|
||||||
|
(cons (%imported-modules store modules #:system system #:guile guile)
|
||||||
|
(%compiled-modules store modules #:system system #:guile guile)))
|
||||||
|
|
||||||
(define* (build-expression->derivation store name exp ;deprecated
|
(define* (build-expression->derivation store name exp ;deprecated
|
||||||
#:key
|
#:key
|
||||||
(system (%current-system))
|
(system (%current-system))
|
||||||
|
|
@ -1330,16 +1338,15 @@ and PROPERTIES."
|
||||||
;; fixed-output.
|
;; fixed-output.
|
||||||
(filter-map source-path inputs)))
|
(filter-map source-path inputs)))
|
||||||
|
|
||||||
(mod-drv (and (pair? modules)
|
(mod+go-drv (if (pair? modules)
|
||||||
(%imported-modules store modules
|
(imported+compiled-modules store modules
|
||||||
#:guile guile-drv
|
#:guile guile-drv
|
||||||
#:system system)))
|
#:system system)
|
||||||
|
'(#f . #f)))
|
||||||
|
(mod-drv (car mod+go-drv))
|
||||||
|
(go-drv (cdr mod+go-drv))
|
||||||
(mod-dir (and mod-drv
|
(mod-dir (and mod-drv
|
||||||
(derivation->output-path mod-drv)))
|
(derivation->output-path mod-drv)))
|
||||||
(go-drv (and (pair? modules)
|
|
||||||
(%compiled-modules store modules
|
|
||||||
#:guile guile-drv
|
|
||||||
#:system system)))
|
|
||||||
(go-dir (and go-drv
|
(go-dir (and go-drv
|
||||||
(derivation->output-path go-drv))))
|
(derivation->output-path go-drv))))
|
||||||
(derivation store name guile
|
(derivation store name guile
|
||||||
|
|
|
||||||
Reference in a new issue