ci: Build commencement packages supported on the target system.

This is a followup to df49fe2a13.

* gnu/ci.scm (%bootstrap-packages): Rename to...
(commencement-packages): ... this, and turn into a procedure.  Filter
packages that pass 'supported-package?'.
(cuirass-jobs): Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2021-07-10 19:59:31 +02:00
parent 80506bc6da
commit ac815ecd63
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -69,7 +69,6 @@
#:export (derivation->job #:export (derivation->job
image->job image->job
%bootstrap-packages
%core-packages %core-packages
%cross-targets %cross-targets
channel-source->package channel-source->package
@ -149,13 +148,18 @@ SYSTEM."
%guile-bootstrap-tarball %guile-bootstrap-tarball
%bootstrap-tarballs)) %bootstrap-tarballs))
(define %bootstrap-packages (define (commencement-packages system)
;; Return the list of bootstrap packages from the commencement module. "Return the list of bootstrap packages from the commencement module for
(filter package? SYSTEM."
(module-map ;; Only include packages supported on SYSTEM. For example, the Mes
(lambda (sym var) ;; bootstrap graph is currently not supported on ARM so it should be
(variable-ref var)) ;; excluded.
(resolve-module '(gnu packages commencement))))) (filter (lambda (obj)
(and (package? obj)
(supported-package? obj system)))
(module-map (lambda (sym var)
(variable-ref var))
(resolve-module '(gnu packages commencement)))))
(define (packages-to-cross-build target) (define (packages-to-cross-build target)
"Return the list of packages to cross-build for TARGET." "Return the list of packages to cross-build for TARGET."
@ -517,7 +521,7 @@ valid."
(map (lambda (package) (map (lambda (package)
(package-job store (job-name package) (package-job store (job-name package)
package system)) package system))
(append %bootstrap-packages %core-packages)) (append (commencement-packages system) %core-packages))
(cross-jobs store system))) (cross-jobs store system)))
('guix ('guix
;; Build Guix modules only. ;; Build Guix modules only.