;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
#:use-module (guix config)
#:autoload (guix describe) (package-channels)
#:use-module (guix store)
- #:use-module (guix grafts)
#:use-module (guix profiles)
#:use-module (guix packages)
#:autoload (guix transformations) (tunable-package? tuned-package)
#:use-module ((guix licenses)
#:select (gpl3+ license? license-name))
#:use-module ((guix utils) #:select (%current-system))
+ #:use-module ((guix scripts system) #:select (read-operating-system))
#:use-module ((guix scripts pack)
- #:select (lookup-compressor self-contained-tarball))
+ #:select (self-contained-tarball))
#:use-module (gnu bootloader)
#:use-module (gnu bootloader u-boot)
+ #:use-module (gnu compression)
#:use-module (gnu image)
#:use-module (gnu packages)
#:use-module (gnu packages gcc)
(drv (run-with-store store
(mbegin %store-monad
(set-guile-for-build (default-guile))
- (lower-object (system-image image))))))
+ (lower-object (system-image image) system)))))
(parameterize ((%graft? #f))
(derivation->job name drv))))
-(define (image-jobs store system)
+(define* (image-jobs store system
+ #:key source commit)
"Return a list of jobs that build images for SYSTEM."
(define MiB
(expt 2 20))
- (if (member system %guix-system-supported-systems)
- `(,(image->job store
- (image
- (inherit efi-disk-image)
- (operating-system installation-os))
- #:name "usb-image"
- #:system system)
- ,(image->job
- store
- (image
- (inherit (image-with-label
- iso9660-image
- (string-append "GUIX_" system "_"
- (if (> (string-length %guix-version) 7)
- (substring %guix-version 0 7)
- %guix-version))))
- (operating-system installation-os))
- #:name "iso9660-image"
- #:system system)
- ;; Only cross-compile Guix System images from x86_64-linux for now.
- ,@(if (string=? system "x86_64-linux")
- (map (cut image->job store <>
- #:system system)
- %guix-system-images)
- '()))
- '()))
+ (parameterize ((current-guix-package
+ (channel-source->package source #:commit commit)))
+ (if (member system %guix-system-supported-systems)
+ `(,(image->job store
+ (image
+ (inherit efi-disk-image)
+ (operating-system installation-os))
+ #:name "usb-image"
+ #:system system)
+ ,(image->job
+ store
+ (image
+ (inherit (image-with-label
+ iso9660-image
+ (string-append "GUIX_" system "_"
+ (if (> (string-length %guix-version) 7)
+ (substring %guix-version 0 7)
+ %guix-version))))
+ (operating-system installation-os))
+ #:name "iso9660-image"
+ #:system system)
+ ;; Only cross-compile Guix System images from x86_64-linux for now.
+ ,@(if (string=? system "x86_64-linux")
+ (map (cut image->job store <>
+ #:system system)
+ %guix-system-images)
+ '()))
+ '())))
(define* (system-test-jobs store system
#:key source commit)
hello system))))
('images
;; Build Guix System images only.
- (image-jobs store system))
+ (image-jobs store system
+ #:source source
+ #:commit commit))
('system-tests
;; Build Guix System tests only.
(system-test-jobs store system