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 '()))))
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)))