aboutsummaryrefslogtreecommitdiff
path: root/guix/store.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-12 22:19:44 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-12 23:56:33 +0200
commit45bba47510a3768c59060373d2cc7beca3cd1b07 (patch)
tree21612a1f516e7724f4a7a330ebf4185147232d7b /guix/store.scm
parentbbb1246fd8761596b5f9b48b2c3b990da35def60 (diff)
downloadgnu-guix-45bba47510a3768c59060373d2cc7beca3cd1b07.tar
gnu-guix-45bba47510a3768c59060373d2cc7beca3cd1b07.tar.gz
store: 'run-with-store' has a #:target parameter.
* guix/store.scm (run-with-store): Add #:target and honor it.
Diffstat (limited to 'guix/store.scm')
-rw-r--r--guix/store.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/guix/store.scm b/guix/store.scm
index 00d1e26fc4..d571122021 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -1429,7 +1429,8 @@ where FILE is the entry's absolute file name and STAT is the result of
(define* (run-with-store store mval
#:key
(guile-for-build (%guile-for-build))
- (system (%current-system)))
+ (system (%current-system))
+ (target #f))
"Run MVAL, a monadic value in the store monad, in STORE, an open store
connection, and return the result."
;; Initialize the dynamic bindings here to avoid bad surprises. The
@@ -1437,7 +1438,7 @@ connection, and return the result."
;; bind-time and not at call time, which can be disconcerting.
(parameterize ((%guile-for-build guile-for-build)
(%current-system system)
- (%current-target-system #f))
+ (%current-target-system target))
(call-with-values (lambda ()
(run-with-state mval store))
(lambda (result store)