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
This commit is contained in:
Efraim Flashner 2025-02-20 14:16:55 +02:00
parent 17b7b1a5cf
commit 98be4efdb8
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -706,15 +706,19 @@ values.")))))))))
(ensure-list (load* file (make-user-module '())))) (ensure-list (load* file (make-user-module '()))))
result)))) result))))
(('manifest . manifest) (('manifest . manifest)
(loop tail 'regular ;; Otherwise '--system' is ignored.
(append (map manifest-entry-item ;; Wrap the loop instead of adjusting each item so that manifest
(manifest-entries ;; items can individually be for different systems.
(ensure-manifest (parameterize ((%current-system system))
(load* manifest (loop tail 'regular
(make-user-module '((guix profiles) (append (map manifest-entry-item
(gnu)))) (manifest-entries
manifest))) (ensure-manifest
result))) (load* manifest
(make-user-module '((guix profiles)
(gnu))))
manifest)))
result))))
(('expression . str) (('expression . str)
(loop tail 'regular (loop tail 'regular
(append (append-map for-type (ensure-list (read/eval str))) (append (append-map for-type (ensure-list (read/eval str)))