| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> |
| 4 | ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org> |
| 5 | ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu> |
| 6 | ;;; |
| 7 | ;;; This file is part of GNU Guix. |
| 8 | ;;; |
| 9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 10 | ;;; under the terms of the GNU General Public License as published by |
| 11 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 12 | ;;; your option) any later version. |
| 13 | ;;; |
| 14 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | ;;; GNU General Public License for more details. |
| 18 | ;;; |
| 19 | ;;; You should have received a copy of the GNU General Public License |
| 20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | (define-module (gnu ci) |
| 23 | #:use-module (guix config) |
| 24 | #:use-module (guix store) |
| 25 | #:use-module (guix grafts) |
| 26 | #:use-module (guix profiles) |
| 27 | #:use-module (guix packages) |
| 28 | #:use-module (guix channels) |
| 29 | #:use-module (guix config) |
| 30 | #:use-module (guix derivations) |
| 31 | #:use-module (guix build-system) |
| 32 | #:use-module (guix monads) |
| 33 | #:use-module (guix gexp) |
| 34 | #:use-module (guix ui) |
| 35 | #:use-module ((guix licenses) |
| 36 | #:select (gpl3+ license? license-name)) |
| 37 | #:use-module ((guix utils) #:select (%current-system)) |
| 38 | #:use-module ((guix scripts system) #:select (read-operating-system)) |
| 39 | #:use-module ((guix scripts pack) |
| 40 | #:select (lookup-compressor self-contained-tarball)) |
| 41 | #:use-module (gnu bootloader) |
| 42 | #:use-module (gnu bootloader u-boot) |
| 43 | #:use-module (gnu image) |
| 44 | #:use-module (gnu packages) |
| 45 | #:use-module (gnu packages gcc) |
| 46 | #:use-module (gnu packages base) |
| 47 | #:use-module (gnu packages gawk) |
| 48 | #:use-module (gnu packages guile) |
| 49 | #:use-module (gnu packages gettext) |
| 50 | #:use-module (gnu packages compression) |
| 51 | #:use-module (gnu packages multiprecision) |
| 52 | #:use-module (gnu packages make-bootstrap) |
| 53 | #:use-module (gnu packages package-management) |
| 54 | #:use-module (gnu system) |
| 55 | #:use-module (gnu system image) |
| 56 | #:use-module (gnu system vm) |
| 57 | #:use-module (gnu system install) |
| 58 | #:use-module (gnu system images hurd) |
| 59 | #:use-module (gnu tests) |
| 60 | #:use-module (srfi srfi-1) |
| 61 | #:use-module (srfi srfi-26) |
| 62 | #:use-module (ice-9 match) |
| 63 | #:export (%cross-targets |
| 64 | channel-source->package |
| 65 | hydra-jobs)) |
| 66 | |
| 67 | ;;; Commentary: |
| 68 | ;;; |
| 69 | ;;; This file defines build jobs for the Hydra and Cuirass continuation |
| 70 | ;;; integration tools. |
| 71 | ;;; |
| 72 | ;;; Code: |
| 73 | |
| 74 | (define* (package->alist store package system |
| 75 | #:optional (package-derivation package-derivation)) |
| 76 | "Convert PACKAGE to an alist suitable for Hydra." |
| 77 | (parameterize ((%graft? #f)) |
| 78 | (let ((drv (package-derivation store package system |
| 79 | #:graft? #f))) |
| 80 | `((derivation . ,(derivation-file-name drv)) |
| 81 | (nix-name . ,(derivation-name drv)) |
| 82 | (system . ,(derivation-system drv)) |
| 83 | (description . ,(package-synopsis package)) |
| 84 | (long-description . ,(package-description package)) |
| 85 | |
| 86 | ;; XXX: Hydra ignores licenses that are not a <license> structure or a |
| 87 | ;; list thereof. |
| 88 | (license . ,(let loop ((license (package-license package))) |
| 89 | (match license |
| 90 | ((? license?) |
| 91 | (license-name license)) |
| 92 | ((lst ...) |
| 93 | (map loop license))))) |
| 94 | |
| 95 | (home-page . ,(package-home-page package)) |
| 96 | (maintainers . ("bug-guix@gnu.org")) |
| 97 | (max-silent-time . ,(or (assoc-ref (package-properties package) |
| 98 | 'max-silent-time) |
| 99 | 3600)) ;1 hour by default |
| 100 | (timeout . ,(or (assoc-ref (package-properties package) 'timeout) |
| 101 | 72000)))))) ;20 hours by default |
| 102 | |
| 103 | (define (package-job store job-name package system) |
| 104 | "Return a job called JOB-NAME that builds PACKAGE on SYSTEM." |
| 105 | (let ((job-name (symbol-append job-name (string->symbol ".") |
| 106 | (string->symbol system)))) |
| 107 | `(,job-name . ,(cut package->alist store package system)))) |
| 108 | |
| 109 | (define (package-cross-job store job-name package target system) |
| 110 | "Return a job called TARGET.JOB-NAME that cross-builds PACKAGE for TARGET on |
| 111 | SYSTEM." |
| 112 | `(,(symbol-append (string->symbol target) (string->symbol ".") job-name |
| 113 | (string->symbol ".") (string->symbol system)) . |
| 114 | ,(cute package->alist store package system |
| 115 | (lambda* (store package system #:key graft?) |
| 116 | (package-cross-derivation store package target system |
| 117 | #:graft? graft?))))) |
| 118 | |
| 119 | (define %core-packages |
| 120 | ;; Note: Don't put the '-final' package variants because (1) that's |
| 121 | ;; implicit, and (2) they cannot be cross-built (due to the explicit input |
| 122 | ;; chain.) |
| 123 | (list gcc-7 gcc-8 gcc-9 gcc-10 glibc binutils |
| 124 | gmp mpfr mpc coreutils findutils diffutils patch sed grep |
| 125 | gawk gnu-gettext hello guile-2.0 guile-2.2 zlib gzip xz |
| 126 | %bootstrap-binaries-tarball |
| 127 | %binutils-bootstrap-tarball |
| 128 | (%glibc-bootstrap-tarball) |
| 129 | %gcc-bootstrap-tarball |
| 130 | %guile-bootstrap-tarball |
| 131 | %bootstrap-tarballs)) |
| 132 | |
| 133 | (define (packages-to-cross-build target) |
| 134 | "Return the list of packages to cross-build for TARGET." |
| 135 | ;; Don't cross-build the bootstrap tarballs for MinGW. |
| 136 | (if (string-contains target "mingw") |
| 137 | (drop-right %core-packages 6) |
| 138 | %core-packages)) |
| 139 | |
| 140 | (define %cross-targets |
| 141 | '("mips64el-linux-gnu" |
| 142 | "arm-linux-gnueabihf" |
| 143 | "aarch64-linux-gnu" |
| 144 | "powerpc-linux-gnu" |
| 145 | "riscv64-linux-gnu" |
| 146 | "i586-pc-gnu" ;aka. GNU/Hurd |
| 147 | "i686-w64-mingw32" |
| 148 | "x86_64-w64-mingw32")) |
| 149 | |
| 150 | (define (cross-jobs store system) |
| 151 | "Return a list of cross-compilation jobs for SYSTEM." |
| 152 | (define (from-32-to-64? target) |
| 153 | ;; Return true if SYSTEM is 32-bit and TARGET is 64-bit. This hack |
| 154 | ;; prevents known-to-fail cross-builds from i686-linux or armhf-linux to |
| 155 | ;; mips64el-linux-gnuabi64. |
| 156 | (and (or (string-prefix? "i686-" system) |
| 157 | (string-prefix? "i586-" system) |
| 158 | (string-prefix? "armhf-" system)) |
| 159 | (string-contains target "64"))) ;x86_64, mips64el, aarch64, etc. |
| 160 | |
| 161 | (define (same? target) |
| 162 | ;; Return true if SYSTEM and TARGET are the same thing. This is so we |
| 163 | ;; don't try to cross-compile to 'mips64el-linux-gnu' from |
| 164 | ;; 'mips64el-linux'. |
| 165 | (or (string-contains target system) |
| 166 | (and (string-prefix? "armhf" system) ;armhf-linux |
| 167 | (string-prefix? "arm" target)))) ;arm-linux-gnueabihf |
| 168 | |
| 169 | (define (pointless? target) |
| 170 | ;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM. |
| 171 | (match system |
| 172 | ((or "x86_64-linux" "i686-linux") |
| 173 | (if (string-contains target "mingw") |
| 174 | (not (string=? "x86_64-linux" system)) |
| 175 | #f)) |
| 176 | (_ |
| 177 | ;; Don't try to cross-compile from non-Intel platforms: this isn't |
| 178 | ;; very useful and these are often brittle configurations. |
| 179 | #t))) |
| 180 | |
| 181 | (define (either proc1 proc2 proc3) |
| 182 | (lambda (x) |
| 183 | (or (proc1 x) (proc2 x) (proc3 x)))) |
| 184 | |
| 185 | (append-map (lambda (target) |
| 186 | (map (lambda (package) |
| 187 | (package-cross-job store (job-name package) |
| 188 | package target system)) |
| 189 | (packages-to-cross-build target))) |
| 190 | (remove (either from-32-to-64? same? pointless?) |
| 191 | %cross-targets))) |
| 192 | |
| 193 | ;; Architectures that are able to build or cross-build Guix System images. |
| 194 | ;; This does not mean that other architectures are not supported, only that |
| 195 | ;; they are often not fast enough to support Guix System images building. |
| 196 | (define %guix-system-supported-systems |
| 197 | '("x86_64-linux" "i686-linux")) |
| 198 | |
| 199 | (define %guix-system-images |
| 200 | (list hurd-barebones-qcow2-image)) |
| 201 | |
| 202 | (define (image-jobs store system) |
| 203 | "Return a list of jobs that build images for SYSTEM." |
| 204 | (define (->alist drv) |
| 205 | `((derivation . ,(derivation-file-name drv)) |
| 206 | (nix-name . ,(derivation-name drv)) |
| 207 | (system . ,(derivation-system drv)) |
| 208 | (description . "Stand-alone image of the GNU system") |
| 209 | (long-description . "This is a demo stand-alone image of the GNU |
| 210 | system.") |
| 211 | (license . ,(license-name gpl3+)) |
| 212 | (max-silent-time . 600) |
| 213 | (timeout . 3600) |
| 214 | (home-page . ,%guix-home-page-url) |
| 215 | (maintainers . ("bug-guix@gnu.org")))) |
| 216 | |
| 217 | (define (->job name drv) |
| 218 | (let ((name (symbol-append name (string->symbol ".") |
| 219 | (string->symbol system)))) |
| 220 | `(,name . ,(lambda () |
| 221 | (parameterize ((%graft? #f)) |
| 222 | (->alist drv)))))) |
| 223 | |
| 224 | (define (build-image image) |
| 225 | (run-with-store store |
| 226 | (mbegin %store-monad |
| 227 | (set-guile-for-build (default-guile)) |
| 228 | (lower-object (system-image image))))) |
| 229 | |
| 230 | (define MiB |
| 231 | (expt 2 20)) |
| 232 | |
| 233 | (if (member system %guix-system-supported-systems) |
| 234 | `(,(->job 'usb-image |
| 235 | (build-image |
| 236 | (image |
| 237 | (inherit efi-disk-image) |
| 238 | (operating-system installation-os)))) |
| 239 | ,(->job 'iso9660-image |
| 240 | (build-image |
| 241 | (image |
| 242 | (inherit (image-with-label |
| 243 | iso9660-image |
| 244 | (string-append "GUIX_" system "_" |
| 245 | (if (> (string-length %guix-version) 7) |
| 246 | (substring %guix-version 0 7) |
| 247 | %guix-version)))) |
| 248 | (operating-system installation-os)))) |
| 249 | ;; Only cross-compile Guix System images from x86_64-linux for now. |
| 250 | ,@(if (string=? system "x86_64-linux") |
| 251 | (map (lambda (image) |
| 252 | (->job (image-name image) (build-image image))) |
| 253 | %guix-system-images) |
| 254 | '())) |
| 255 | '())) |
| 256 | |
| 257 | (define channel-build-system |
| 258 | ;; Build system used to "convert" a channel instance to a package. |
| 259 | (let* ((build (lambda* (store name inputs |
| 260 | #:key source commit system |
| 261 | #:allow-other-keys) |
| 262 | (run-with-store store |
| 263 | ;; SOURCE can be a lowerable object such as <local-file> |
| 264 | ;; or a file name. Adjust accordingly. |
| 265 | (mlet* %store-monad ((source (if (string? source) |
| 266 | (return source) |
| 267 | (lower-object source))) |
| 268 | (instance |
| 269 | -> (checkout->channel-instance |
| 270 | source #:commit commit))) |
| 271 | (channel-instances->derivation (list instance))) |
| 272 | #:system system))) |
| 273 | (lower (lambda* (name #:key system source commit |
| 274 | #:allow-other-keys) |
| 275 | (bag |
| 276 | (name name) |
| 277 | (system system) |
| 278 | (build build) |
| 279 | (arguments `(#:source ,source |
| 280 | #:commit ,commit)))))) |
| 281 | (build-system (name 'channel) |
| 282 | (description "Turn a channel instance into a package.") |
| 283 | (lower lower)))) |
| 284 | |
| 285 | (define* (channel-source->package source #:key commit) |
| 286 | "Return a package for the given channel SOURCE, a lowerable object." |
| 287 | (package |
| 288 | (inherit guix) |
| 289 | (version (string-append (package-version guix) "+")) |
| 290 | (build-system channel-build-system) |
| 291 | (arguments `(#:source ,source |
| 292 | #:commit ,commit)) |
| 293 | (inputs '()) |
| 294 | (native-inputs '()) |
| 295 | (propagated-inputs '()))) |
| 296 | |
| 297 | (define* (system-test-jobs store system |
| 298 | #:key source commit) |
| 299 | "Return a list of jobs for the system tests." |
| 300 | (define (test->thunk test) |
| 301 | (lambda () |
| 302 | (define drv |
| 303 | (run-with-store store |
| 304 | (mbegin %store-monad |
| 305 | (set-current-system system) |
| 306 | (set-grafting #f) |
| 307 | (set-guile-for-build (default-guile)) |
| 308 | (system-test-value test)))) |
| 309 | |
| 310 | `((derivation . ,(derivation-file-name drv)) |
| 311 | (nix-name . ,(derivation-name drv)) |
| 312 | (system . ,(derivation-system drv)) |
| 313 | (description . ,(format #f "Guix '~a' system test" |
| 314 | (system-test-name test))) |
| 315 | (long-description . ,(system-test-description test)) |
| 316 | (license . ,(license-name gpl3+)) |
| 317 | (max-silent-time . 600) |
| 318 | (timeout . 3600) |
| 319 | (home-page . ,%guix-home-page-url) |
| 320 | (maintainers . ("bug-guix@gnu.org"))))) |
| 321 | |
| 322 | (define (->job test) |
| 323 | (let ((name (string->symbol |
| 324 | (string-append "test." (system-test-name test) |
| 325 | "." system)))) |
| 326 | (cons name (test->thunk test)))) |
| 327 | |
| 328 | (if (member system %guix-system-supported-systems) |
| 329 | ;; Override the value of 'current-guix' used by system tests. Using a |
| 330 | ;; channel instance makes tests that rely on 'current-guix' less |
| 331 | ;; expensive. It also makes sure we get a valid Guix package when this |
| 332 | ;; code is not running from a checkout. |
| 333 | (parameterize ((current-guix-package |
| 334 | (channel-source->package source #:commit commit))) |
| 335 | (map ->job (all-system-tests))) |
| 336 | '())) |
| 337 | |
| 338 | (define (tarball-jobs store system) |
| 339 | "Return Hydra jobs to build the self-contained Guix binary tarball." |
| 340 | (define (->alist drv) |
| 341 | `((derivation . ,(derivation-file-name drv)) |
| 342 | (nix-name . ,(derivation-name drv)) |
| 343 | (system . ,(derivation-system drv)) |
| 344 | (description . "Stand-alone binary Guix tarball") |
| 345 | (long-description . "This is a tarball containing binaries of Guix and |
| 346 | all its dependencies, and ready to be installed on \"foreign\" distributions.") |
| 347 | (license . ,(license-name gpl3+)) |
| 348 | (home-page . ,%guix-home-page-url) |
| 349 | (maintainers . ("bug-guix@gnu.org")))) |
| 350 | |
| 351 | (define (->job name drv) |
| 352 | (let ((name (symbol-append name (string->symbol ".") |
| 353 | (string->symbol system)))) |
| 354 | `(,name . ,(lambda () |
| 355 | (parameterize ((%graft? #f)) |
| 356 | (->alist drv)))))) |
| 357 | |
| 358 | ;; XXX: Add a job for the stable Guix? |
| 359 | (list (->job 'binary-tarball |
| 360 | (run-with-store store |
| 361 | (mbegin %store-monad |
| 362 | (set-guile-for-build (default-guile)) |
| 363 | (>>= (profile-derivation (packages->manifest (list guix))) |
| 364 | (lambda (profile) |
| 365 | (self-contained-tarball "guix-binary" profile |
| 366 | #:localstatedir? #t |
| 367 | #:compressor |
| 368 | (lookup-compressor "xz"))))) |
| 369 | #:system system)))) |
| 370 | |
| 371 | (define job-name |
| 372 | ;; Return the name of a package's job. |
| 373 | (compose string->symbol |
| 374 | (cut package-full-name <> "-"))) |
| 375 | |
| 376 | (define package->job |
| 377 | (let ((base-packages |
| 378 | (delete-duplicates |
| 379 | (append-map (match-lambda |
| 380 | ((_ package _ ...) |
| 381 | (match (package-transitive-inputs package) |
| 382 | (((_ inputs _ ...) ...) |
| 383 | inputs)))) |
| 384 | (%final-inputs))))) |
| 385 | (lambda (store package system) |
| 386 | "Return a job for PACKAGE on SYSTEM, or #f if this combination is not |
| 387 | valid." |
| 388 | (cond ((member package base-packages) |
| 389 | (package-job store (symbol-append 'base. (job-name package)) |
| 390 | package system)) |
| 391 | ((supported-package? package system) |
| 392 | (let ((drv (package-derivation store package system |
| 393 | #:graft? #f))) |
| 394 | (and (substitutable-derivation? drv) |
| 395 | (package-job store (job-name package) |
| 396 | package system)))) |
| 397 | (else |
| 398 | #f))))) |
| 399 | |
| 400 | (define (all-packages) |
| 401 | "Return the list of packages to build." |
| 402 | (define (adjust package result) |
| 403 | (cond ((package-replacement package) |
| 404 | ;; XXX: If PACKAGE and its replacement have the same name/version, |
| 405 | ;; then both Cuirass jobs will have the same name, which |
| 406 | ;; effectively means that the second one will be ignored. Thus, |
| 407 | ;; return the replacement first. |
| 408 | (cons* (package-replacement package) ;build both |
| 409 | package |
| 410 | result)) |
| 411 | ((package-superseded package) |
| 412 | result) ;don't build it |
| 413 | (else |
| 414 | (cons package result)))) |
| 415 | |
| 416 | (fold-packages adjust |
| 417 | (fold adjust '() ;include base packages |
| 418 | (match (%final-inputs) |
| 419 | (((labels packages _ ...) ...) |
| 420 | packages))) |
| 421 | #:select? (const #t))) ;include hidden packages |
| 422 | |
| 423 | (define (arguments->manifests arguments) |
| 424 | "Return the list of manifests extracted from ARGUMENTS." |
| 425 | (map (match-lambda |
| 426 | ((input-name . relative-path) |
| 427 | (let* ((checkout (assq-ref arguments (string->symbol input-name))) |
| 428 | (base (assq-ref checkout 'file-name))) |
| 429 | (in-vicinity base relative-path)))) |
| 430 | (assq-ref arguments 'manifests))) |
| 431 | |
| 432 | (define (manifests->packages store manifests) |
| 433 | "Return the list of packages found in MANIFESTS." |
| 434 | (define (load-manifest manifest) |
| 435 | (save-module-excursion |
| 436 | (lambda () |
| 437 | (set-current-module (make-user-module '((guix profiles) (gnu)))) |
| 438 | (primitive-load manifest)))) |
| 439 | |
| 440 | (delete-duplicates! |
| 441 | (map manifest-entry-item |
| 442 | (append-map (compose manifest-entries |
| 443 | load-manifest) |
| 444 | manifests)))) |
| 445 | |
| 446 | (define (find-current-checkout arguments) |
| 447 | "Find the first checkout of ARGUMENTS that provided the current file. |
| 448 | Return #f if no such checkout is found." |
| 449 | (let ((current-root |
| 450 | (canonicalize-path |
| 451 | (string-append (dirname (current-filename)) "/..")))) |
| 452 | (find (lambda (argument) |
| 453 | (and=> (assq-ref argument 'file-name) |
| 454 | (lambda (name) |
| 455 | (string=? name current-root)))) arguments))) |
| 456 | |
| 457 | \f |
| 458 | ;;; |
| 459 | ;;; Hydra entry point. |
| 460 | ;;; |
| 461 | |
| 462 | (define (hydra-jobs store arguments) |
| 463 | "Return Hydra jobs." |
| 464 | (define subset |
| 465 | (match (assoc-ref arguments 'subset) |
| 466 | ("core" 'core) ; only build core packages |
| 467 | ("hello" 'hello) ; only build hello |
| 468 | (((? string?) (? string?) ...) 'list) ; only build selected list of packages |
| 469 | ("manifests" 'manifests) ; only build packages in the list of manifests |
| 470 | (_ 'all))) ; build everything |
| 471 | |
| 472 | (define systems |
| 473 | (match (assoc-ref arguments 'systems) |
| 474 | (#f %hydra-supported-systems) |
| 475 | ((lst ...) lst) |
| 476 | ((? string? str) (call-with-input-string str read)))) |
| 477 | |
| 478 | (define checkout |
| 479 | (or (find-current-checkout arguments) |
| 480 | (assq-ref arguments 'superior-guix-checkout))) |
| 481 | |
| 482 | (define commit |
| 483 | (assq-ref checkout 'revision)) |
| 484 | |
| 485 | (define source |
| 486 | (assq-ref checkout 'file-name)) |
| 487 | |
| 488 | ;; Turn off grafts. Grafting is meant to happen on the user's machines. |
| 489 | (parameterize ((%graft? #f)) |
| 490 | ;; Return one job for each package, except bootstrap packages. |
| 491 | (append-map (lambda (system) |
| 492 | (format (current-error-port) |
| 493 | "evaluating for '~a' (heap size: ~a MiB)...~%" |
| 494 | system |
| 495 | (round |
| 496 | (/ (assoc-ref (gc-stats) 'heap-size) |
| 497 | (expt 2. 20)))) |
| 498 | (invalidate-derivation-caches!) |
| 499 | (case subset |
| 500 | ((all) |
| 501 | ;; Build everything, including replacements. |
| 502 | (let ((all (all-packages)) |
| 503 | (job (lambda (package) |
| 504 | (package->job store package |
| 505 | system)))) |
| 506 | (append (filter-map job all) |
| 507 | (image-jobs store system) |
| 508 | (system-test-jobs store system |
| 509 | #:source source |
| 510 | #:commit commit) |
| 511 | (tarball-jobs store system) |
| 512 | (cross-jobs store system)))) |
| 513 | ((core) |
| 514 | ;; Build core packages only. |
| 515 | (append (map (lambda (package) |
| 516 | (package-job store (job-name package) |
| 517 | package system)) |
| 518 | %core-packages) |
| 519 | (cross-jobs store system))) |
| 520 | ((hello) |
| 521 | ;; Build hello package only. |
| 522 | (let ((hello (specification->package "hello"))) |
| 523 | (list (package-job store (job-name hello) hello system)))) |
| 524 | ((list) |
| 525 | ;; Build selected list of packages only. |
| 526 | (let* ((names (assoc-ref arguments 'subset)) |
| 527 | (packages (map specification->package names))) |
| 528 | (map (lambda (package) |
| 529 | (package-job store (job-name package) |
| 530 | package system)) |
| 531 | packages))) |
| 532 | ((manifests) |
| 533 | ;; Build packages in the list of manifests. |
| 534 | (let* ((manifests (arguments->manifests arguments)) |
| 535 | (packages (manifests->packages store manifests))) |
| 536 | (map (lambda (package) |
| 537 | (package-job store (job-name package) |
| 538 | package system)) |
| 539 | packages))) |
| 540 | (else |
| 541 | (error "unknown subset" subset)))) |
| 542 | systems))) |