aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-01-05 00:04:12 +0100
committerLudovic Courtès <ludo@gnu.org>2019-01-05 00:08:04 +0100
commitec651f2562241064db7dd0d2a181cd85c787b541 (patch)
treefd5fdd5ba65e5d224034ffb54793255a4f6b181c /guix
parent9ec154f51f52ee3702c611637e96ccb0d59f543a (diff)
downloadgnu-guix-ec651f2562241064db7dd0d2a181cd85c787b541.tar
gnu-guix-ec651f2562241064db7dd0d2a181cd85c787b541.tar.gz
guix build: Honor '--system' for file-like objects and gexps.
Fixes a bug whereby "guix build -f file.scm -s SYSTEM" would not honor SYSTEM when 'file.scm' returns a gexp or a file-like object. * guix/scripts/build.scm (options->derivations): Pass #:system to 'run-with-store' in the 'file-like?' and 'gexp?' cases.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/build.scm8
1 files changed, 5 insertions, 3 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 0b7da3189e..564bdf0ced 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -788,13 +788,15 @@ package '~a' has no source~%")
((? file-like? obj)
(list (run-with-store store
(lower-object obj system
- #:target (assoc-ref opts 'target)))))
+ #:target (assoc-ref opts 'target))
+ #:system system)))
((? gexp? gexp)
(list (run-with-store store
(mbegin %store-monad
(set-guile-for-build (default-guile))
(gexp->derivation "gexp" gexp
- #:system system))))))
+ #:system system))
+ #:system system))))
(map (cut transform store <>)
(options->things-to-build opts))))))