aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2025-02-20 14:16:55 +0200
committerEfraim Flashner <efraim@flashner.co.il>2025-03-02 16:46:59 +0200
commit98be4efdb8a39aca9ff839d57aba0905bd3caa02 (patch)
tree0c8eade971d1f935878a6202ac1bb1d0c0a9e8e5
parent17b7b1a5cf1339bc5455c1576bb6431e9b3b23ff (diff)
downloadguix-98be4efdb8a39aca9ff839d57aba0905bd3caa02.tar.gz
guix-98be4efdb8a39aca9ff839d57aba0905bd3caa02.zip
guix build: Honor '--system' with '--manifest'.
* guix/scripts/build.scm (options->things-to-build): Wrap the manifest build option with the result of the '--system' option. Change-Id: I1c3ff93af56bb659ddc00e1872c769cfc5e7a0d5
-rw-r--r--guix/scripts/build.scm22
1 files changed, 13 insertions, 9 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index f0a637a2ef..dfc37d01d8 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -706,15 +706,19 @@ values.")))))))))
(ensure-list (load* file (make-user-module '()))))
result))))
(('manifest . manifest)
- (loop tail 'regular
- (append (map manifest-entry-item
- (manifest-entries
- (ensure-manifest
- (load* manifest
- (make-user-module '((guix profiles)
- (gnu))))
- manifest)))
- result)))
+ ;; Otherwise '--system' is ignored.
+ ;; Wrap the loop instead of adjusting each item so that manifest
+ ;; items can individually be for different systems.
+ (parameterize ((%current-system system))
+ (loop tail 'regular
+ (append (map manifest-entry-item
+ (manifest-entries
+ (ensure-manifest
+ (load* manifest
+ (make-user-module '((guix profiles)
+ (gnu))))
+ manifest)))
+ result))))
(('expression . str)
(loop tail 'regular
(append (append-map for-type (ensure-list (read/eval str)))