summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2025-06-04 12:51:33 +0200
committerLudovic Courtès <ludo@gnu.org>2025-06-04 16:45:08 +0200
commit871f09b6f7ebf16baeef4b35f9637548acae5a28 (patch)
tree902fcf8b1bca24382df6e80dd3ccd848860b7600 /gnu/system
parent1cd221c9e91f06376e46893e9556112048311428 (diff)
install: Adjust for (package-source guix) not being a <channel>.
Fixes guix/guix#422. * gnu/system/install.scm (%installation-services)[guix-package-commit]: New procedure. <guix-configuration>: Use it instead of ‘channel-commit’. Change-Id: I6ed5bc3f21a375e639fabfcbcdaf70b6347d1c5c
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/install.scm13
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 20960e62b3..c71a533c8e 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -33,6 +33,7 @@
#:use-module (guix store)
#:use-module (guix modules)
#:use-module ((guix packages) #:select (package-version supported-package?))
+ #:autoload (guix channels) (channel? channel-commit)
#:use-module (guix platform)
#:use-module (guix utils)
#:use-module (guix packages)
@@ -353,6 +354,15 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
(define bare-bones-os
(load "examples/bare-bones.tmpl"))
+ (define (guix-package-commit guix)
+ ;; Extract the commit of the GUIX package.
+ (match (package-source guix)
+ ((? channel? source)
+ (channel-commit source))
+ (_
+ (apply (lambda* (#:key commit #:allow-other-keys) commit)
+ (package-arguments guix)))))
+
(append
;; Generic services
(list (service virtual-terminal-service-type)
@@ -403,8 +413,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
;; Do not leak the local checkout URL.
(source (channel
(inherit %default-guix-channel)
- (commit (channel-commit
- (package-source guix))))))))))
+ (commit (guix-package-commit guix)))))))))
;; Start udev so that useful device nodes are available.
;; Use device-mapper rules for cryptsetup & co; enable the CRDA for