[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/11: derivations: Introduce 'imported+compiled-modules'.
From: |
guix-commits |
Subject: |
01/11: derivations: Introduce 'imported+compiled-modules'. |
Date: |
Sun, 27 Oct 2019 18:13:07 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit cf7648f882380dd7a4e82760ecc10cc6078498eb
Author: Ludovic Courtès <address@hidden>
Date: Sun Oct 27 15:18:31 2019 +0100
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'.
---
guix/derivations.scm | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/guix/derivations.scm b/guix/derivations.scm
index e1073ea..8309f84 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -1207,6 +1207,14 @@ they can refer to each other."
#:guile-for-build guile
#: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
#:key
(system (%current-system))
@@ -1330,16 +1338,15 @@ and PROPERTIES."
;; fixed-output.
(filter-map source-path inputs)))
- (mod-drv (and (pair? modules)
- (%imported-modules store modules
- #:guile guile-drv
- #:system system)))
+ (mod+go-drv (if (pair? modules)
+ (imported+compiled-modules store modules
+ #:guile guile-drv
+ #:system system)
+ '(#f . #f)))
+ (mod-drv (car mod+go-drv))
+ (go-drv (cdr mod+go-drv))
(mod-dir (and 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
(derivation->output-path go-drv))))
(derivation store name guile
- branch master updated (6d18427 -> b13b938), guix-commits, 2019/10/27
- 02/11: derivations: 'build-expression->derivation' caches its module derivations., guix-commits, 2019/10/27
- 01/11: derivations: Introduce 'imported+compiled-modules'.,
guix-commits <=
- 04/11: store: Allow objects in the cache to be inserted and search for with 'equal?'., guix-commits, 2019/10/27
- 03/11: gexp: Add 'imported+compiled-modules'., guix-commits, 2019/10/27
- 10/11: pull: Honor '/etc/guix/channels.scm'., guix-commits, 2019/10/27
- 08/11: gnu: bootstrap: Cache the 'bootstrap-executable' origins., guix-commits, 2019/10/27
- 06/11: derivations: Don't memoize 'derivation->bytevector'., guix-commits, 2019/10/27
- 05/11: gexp: Cache the module to derivation mappings., guix-commits, 2019/10/27
- 11/11: news: Add entry for /etc/guix/channels.scm., guix-commits, 2019/10/27
- 07/11: gnu: bootstrap: 'bootstrap-origin' preserves eq?-ness when no changes are made., guix-commits, 2019/10/27
- 09/11: channels: Refer to 'guile-json-3'., guix-commits, 2019/10/27