diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2025-06-04 12:51:33 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-06-04 16:45:08 +0200 |
| commit | 871f09b6f7ebf16baeef4b35f9637548acae5a28 (patch) | |
| tree | 902fcf8b1bca24382df6e80dd3ccd848860b7600 /gnu/system/install.scm | |
| parent | 1cd221c9e91f06376e46893e9556112048311428 (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/install.scm')
| -rw-r--r-- | gnu/system/install.scm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 20960e62b31..c71a533c8e2 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #:use-module (guix store) | 33 | #:use-module (guix store) |
| 34 | #:use-module (guix modules) | 34 | #:use-module (guix modules) |
| 35 | #:use-module ((guix packages) #:select (package-version supported-package?)) | 35 | #:use-module ((guix packages) #:select (package-version supported-package?)) |
| 36 | #:autoload (guix channels) (channel? channel-commit) | ||
| 36 | #:use-module (guix platform) | 37 | #:use-module (guix platform) |
| 37 | #:use-module (guix utils) | 38 | #:use-module (guix utils) |
| 38 | #:use-module (guix packages) | 39 | #:use-module (guix packages) |
| @@ -353,6 +354,15 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m | |||
| 353 | (define bare-bones-os | 354 | (define bare-bones-os |
| 354 | (load "examples/bare-bones.tmpl")) | 355 | (load "examples/bare-bones.tmpl")) |
| 355 | 356 | ||
| 357 | (define (guix-package-commit guix) | ||
| 358 | ;; Extract the commit of the GUIX package. | ||
| 359 | (match (package-source guix) | ||
| 360 | ((? channel? source) | ||
| 361 | (channel-commit source)) | ||
| 362 | (_ | ||
| 363 | (apply (lambda* (#:key commit #:allow-other-keys) commit) | ||
| 364 | (package-arguments guix))))) | ||
| 365 | |||
| 356 | (append | 366 | (append |
| 357 | ;; Generic services | 367 | ;; Generic services |
| 358 | (list (service virtual-terminal-service-type) | 368 | (list (service virtual-terminal-service-type) |
| @@ -403,8 +413,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m | |||
| 403 | ;; Do not leak the local checkout URL. | 413 | ;; Do not leak the local checkout URL. |
| 404 | (source (channel | 414 | (source (channel |
| 405 | (inherit %default-guix-channel) | 415 | (inherit %default-guix-channel) |
| 406 | (commit (channel-commit | 416 | (commit (guix-package-commit guix))))))))) |
| 407 | (package-source guix)))))))))) | ||
| 408 | 417 | ||
| 409 | ;; Start udev so that useful device nodes are available. | 418 | ;; Start udev so that useful device nodes are available. |
| 410 | ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for | 419 | ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for |
