aboutsummaryrefslogtreecommitdiff
path: root/guix/monads.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-01 18:53:16 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-01 22:31:36 +0200
commit53e89b1732d2935d69a199c0213568ae1e66eb60 (patch)
treef234aeb5a1ac3067de933be69600063a8e608d22 /guix/monads.scm
parent79c0c8cdf74cc0587187aa8f25af29b21fe91ba2 (diff)
downloadguix-53e89b1732d2935d69a199c0213568ae1e66eb60.tar
guix-53e89b1732d2935d69a199c0213568ae1e66eb60.tar.gz
monads, gexp: Remove unintended dependency on (gnu packages …).
* guix/gexp.scm (gexp->derivation, gexp->script): Use 'default-guile' instead of an explicit reference to 'guile-final'. (default-guile): New procedure. * guix/monads.scm (run-with-store)[default-guile]: New procedure. Use it.
Diffstat (limited to 'guix/monads.scm')
-rw-r--r--guix/monads.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/monads.scm b/guix/monads.scm
index 809aba59b1..ec2b7f8b3b 100644
--- a/guix/monads.scm
+++ b/guix/monads.scm
@@ -414,10 +414,15 @@ input list as a monadic value."
(system (%current-system)))
"Run MVAL, a monadic value in the store monad, in STORE, an open store
connection."
+ (define (default-guile)
+ ;; Lazily resolve 'guile-final'. This module must not refer to (gnu …)
+ ;; modules directly, to avoid circular dependencies, hence this hack.
+ (module-ref (resolve-interface '(gnu packages base))
+ 'guile-final))
+
(parameterize ((%guile-for-build (or guile-for-build
(package-derivation store
- (@ (gnu packages base)
- guile-final)
+ (default-guile)
system)))
(%current-system system))
(mval store)))