summaryrefslogtreecommitdiff
path: root/gnu/installer.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-03-26 23:06:51 +0100
committerLudovic Courtès <ludo@gnu.org>2019-03-27 11:54:05 +0100
commit50247be5f4633a4c3446cddbd3515d027853ec0d (patch)
treedbdba53956b62e1a9490b9eda8899bec2651d0c8 /gnu/installer.scm
parent54043bf23f9b1a012f26082f57286862c5029865 (diff)
downloadpatches-50247be5f4633a4c3446cddbd3515d027853ec0d.tar
patches-50247be5f4633a4c3446cddbd3515d027853ec0d.tar.gz
installer: Produce an 'initrd-modules' field if needed.
* gnu/installer/parted.scm (root-user-partition?): New procedure. (bootloader-configuration): Use it. (user-partition-missing-modules, initrd-configuration): New procedures. (user-partitions->configuration): Call 'initrd-configuration'.o * gnu/installer.scm (not-config?): Rename to... (module-to-import?): ... this. Add cases to exclude non-installer and non-build (gnu …) modules. (installer-program)[installer-builder]: Add GUIX to the extension list.
Diffstat (limited to 'gnu/installer.scm')
-rw-r--r--gnu/installer.scm20
1 files changed, 13 insertions, 7 deletions
diff --git a/gnu/installer.scm b/gnu/installer.scm
index 02f26eead3..584ca3842f 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -43,13 +43,17 @@
#:use-module (srfi srfi-1)
#:export (installer-program))
-(define not-config?
- ;; Select (guix …) and (gnu …) modules, except (guix config).
+(define module-to-import?
+ ;; Return true for modules that should be imported. For (gnu system …) and
+ ;; (gnu packages …) modules, we simply add the whole 'guix' package via
+ ;; 'with-extensions' (to avoid having to rebuild it all), which is why these
+ ;; modules are excluded here.
(match-lambda
(('guix 'config) #f)
- (('guix rest ...) #t)
- (('gnu rest ...) #t)
- (rest #f)))
+ (('gnu 'installer _ ...) #t)
+ (('gnu 'build _ ...) #t)
+ (('guix 'build _ ...) #t)
+ (_ #f)))
(define* (build-compiled-file name locale-builder)
"Return a file-like object that evalutes the gexp LOCALE-BUILDER and store
@@ -296,13 +300,15 @@ selected keymap."
"gnu/installer"))
(define installer-builder
+ ;; Note: Include GUIX as an extension to get all the (gnu system …), (gnu
+ ;; packages …), etc. modules.
(with-extensions (list guile-gcrypt guile-newt
guile-parted guile-bytestructures
- guile-json)
+ guile-json guile-git guix)
(with-imported-modules `(,@(source-module-closure
`(,@modules
(guix build utils))
- #:select? not-config?)
+ #:select? module-to-import?)
((guix config) => ,(make-config.scm)))
#~(begin
(use-modules (gnu installer record)