diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-05-27 23:19:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-05-27 23:19:49 +0200 |
commit | af018f5e0a1b7c67e9f40ca68929bd35b94206d3 (patch) | |
tree | 8c3efe66f8ac1f6178357937c0a41c6f5ff8f0f8 /guix/monads.scm | |
parent | d84a7be6675bd647931d8eff9134d00dd5a6bd58 (diff) | |
parent | 35066aa596931ef84922298c2760ceba69940cd1 (diff) | |
download | guix-patches-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar guix-patches-af018f5e0a1b7c67e9f40ca68929bd35b94206d3.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/monads.scm')
-rw-r--r-- | guix/monads.scm | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/guix/monads.scm b/guix/monads.scm index db8b645402..ec2b7f8b3b 100644 --- a/guix/monads.scm +++ b/guix/monads.scm @@ -56,10 +56,9 @@ text-file text-file* package-file + origin->derivation package->derivation - built-derivations - derivation-expression - lower-inputs) + built-derivations) #:replace (imported-modules compiled-modules)) @@ -356,6 +355,7 @@ and store file names; the resulting store file holds references to all these." (lambda (port) (display ,(computed-text text inputs) port)))) + ;; TODO: Rewrite using 'gexp->derivation'. (mlet %store-monad ((inputs (lower-inputs inputs))) (derivation-expression name (builder inputs) #:inputs inputs))) @@ -376,7 +376,7 @@ OUTPUT directory of PACKAGE." (define (lower-inputs inputs) "Turn any package from INPUTS into a derivation; return the corresponding input list as a monadic value." - ;; XXX: Should probably be in (guix packages). + ;; XXX: This procedure is bound to disappear with 'derivation-expression'. (with-monad %store-monad (sequence %store-monad (map (match-lambda @@ -390,11 +390,15 @@ input list as a monadic value." inputs)))) (define derivation-expression + ;; XXX: This procedure is superseded by 'gexp->derivation'. (store-lift build-expression->derivation)) (define package->derivation (store-lift package-derivation)) +(define origin->derivation + (store-lift package-source-derivation)) + (define imported-modules (store-lift (@ (guix derivations) imported-modules))) @@ -410,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))) |