civodul pushed a commit to branch master
in repository guix.
commit ec651f2562241064db7dd0d2a181cd85c787b541
Author: Ludovic Courtès <[email protected]>
Date: Sat Jan 5 00:04:12 2019 +0100
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.
---
guix/scripts/build.scm | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index 0b7da31..564bdf0 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
<[email protected]>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès
<[email protected]>
;;; Copyright © 2013 Mark H Weaver <[email protected]>
;;;
;;; 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))))))