[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/22: gexp: Add #:guile parameter to 'load-path-expression'.
From: |
guix-commits |
Subject: |
19/22: gexp: Add #:guile parameter to 'load-path-expression'. |
Date: |
Tue, 30 Mar 2021 17:00:18 -0400 (EDT) |
civodul pushed a commit to branch core-updates
in repository guix.
commit b18e83b10dd902d79be471c502c077d4b6795895
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Mar 24 22:40:31 2021 +0100
gexp: Add #:guile parameter to 'load-path-expression'.
* guix/gexp.scm (load-path-expression): Add #:guile parameter and honor it.
---
guix/gexp.scm | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/guix/gexp.scm b/guix/gexp.scm
index c826525..3e25dfc 100644
--- a/guix/gexp.scm
+++ b/guix/gexp.scm
@@ -1754,21 +1754,26 @@ TARGET, a GNU triplet."
'guile-3.0))
(define* (load-path-expression modules #:optional (path %load-path)
- #:key (extensions '()) system target)
+ #:key (extensions '()) system target
+ (guile (default-guile)))
"Return as a monadic value a gexp that sets '%load-path' and
'%load-compiled-path' to point to MODULES, a list of module names. MODULES
-are searched for in PATH. Return #f when MODULES and EXTENSIONS are empty."
+are searched for in PATH. Return #f when MODULES and EXTENSIONS are empty.
+Assume MODULES are compiled with GUILE."
(if (and (null? modules) (null? extensions))
(with-monad %store-monad
(return #f))
- (mlet %store-monad ((modules (imported-modules modules
- #:module-path path
- #:system system))
- (compiled (compiled-modules modules
- #:extensions extensions
- #:module-path path
- #:system system
- #:target target)))
+ (mlet* %store-monad ((guile (lower-object guile system #:target #f))
+ (compiled (compiled-modules modules
+ #:guile guile
+ #:extensions extensions
+ #:module-path path
+ #:system system
+ #:target target))
+ (modules (imported-modules modules
+ #:guile guile
+ #:module-path path
+ #:system system)))
(return
(gexp (eval-when (expand load eval)
;; Augment the load paths and delete duplicates. Do that
- 03/22: build-system: Rewrite using gexps., (continued)
- 03/22: build-system: Rewrite using gexps., guix-commits, 2021/03/30
- 05/22: packages: Simplify patch instantiation., guix-commits, 2021/03/30
- 11/22: packages: '%standard-patch-inputs' is not influenced by '%current-target-system'., guix-commits, 2021/03/30
- 10/22: build-system: Use 'input-tuples->gexp' and 'outputs->gexp'., guix-commits, 2021/03/30
- 07/22: packages: Default origin 'patch-flags' is a gexp., guix-commits, 2021/03/30
- 12/22: packages: 'expand-input' accepts any file-like object., guix-commits, 2021/03/30
- 06/22: packages: Core procedures are written in monadic style., guix-commits, 2021/03/30
- 08/22: gexp: Add 'sexp->gexp'., guix-commits, 2021/03/30
- 18/22: gexp: 'imported+compiled-modules' fully honors #:guile., guix-commits, 2021/03/30
- 21/22: gnu: gnome-shell: Adjust to new #:disallowed-references convention., guix-commits, 2021/03/30
- 19/22: gexp: Add #:guile parameter to 'load-path-expression'.,
guix-commits <=
- 09/22: build-system: Use 'sexp->gexp' for plain sexps., guix-commits, 2021/03/30
- 14/22: grafts: Add 'without-grafting'., guix-commits, 2021/03/30
- 16/22: gexp: Do not add derivations to the object cache., guix-commits, 2021/03/30
- 22/22: gexp: 'compiled-modules' gets source and parameters an environment variables., guix-commits, 2021/03/30
- 20/22: gexp: 'gexp->script' uses #:guile also as the guile-for-build., guix-commits, 2021/03/30