summaryrefslogtreecommitdiff
path: root/gnu/installer.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2020-03-30 12:24:56 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2020-04-06 15:06:03 +0200
commit786c9c39bc0826737e99f0c750ea30033cdbc202 (patch)
treefbcd5bc021f312a2fed88013a1a526c6d0458c92 /gnu/installer.scm
parenta274bba2f939ae6637ec613bd0537ba415945835 (diff)
downloadpatches-786c9c39bc0826737e99f0c750ea30033cdbc202.tar
patches-786c9c39bc0826737e99f0c750ea30033cdbc202.tar.gz
installer: Add a help page.
* gnu/installer/newt/help.scm: New file. * gnu/local.mk (INSTALLER_MODULES): Add it. * po/guix/POTFILES.in: Add it. * gnu/installer/record.scm (<installer>): Add 'help-menu' and 'help-page' fields, (installer-help-menu, installer-help-page): new exported procedures. * gnu/installer/newt.scm (init): Set the help line, (help-menu, help-page): new procedures used ... (newt-installer): ... here. * gnu/installer/newt/keymap.scm (run-layout-page): Add a context argument to differenciate the help context from the main one, (run-keymap-page): add a context argument and pass it to run-layout-page. * gnu/installer.scm (compute-keymap-step): Add a context argument and pass it to 'installer-keymap-page', (installer-steps): set the help menu and pass the appropriate context to compute-keymap-step calls, (guile-newt): update to revision 2.
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 9f39191d54..084f437604 100644
--- a/gnu/installer.scm
+++ b/gnu/installer.scm
@@ -172,7 +172,7 @@ been performed at build time."
(kmscon-update-keymap (default-keyboard-model)
layout variant))))
-(define* (compute-keymap-step)
+(define* (compute-keymap-step context)
"Return a gexp that runs the keymap-page of INSTALLER and install the
selected keymap."
#~(lambda (current-installer)
@@ -184,7 +184,7 @@ selected keymap."
"/share/X11/xkb/rules/base.xml")))
(lambda (models layouts)
((installer-keymap-page current-installer)
- layouts)))))
+ layouts '#$context)))))
(#$apply-keymap result)
result)))
@@ -193,10 +193,15 @@ selected keymap."
#:locales-name "locales"
#:iso639-languages-name "iso639-languages"
#:iso3166-territories-name "iso3166-territories"))
- (keymap-step (compute-keymap-step))
(timezone-data #~(string-append #$tzdata
"/share/zoneinfo/zone.tab")))
#~(lambda (current-installer)
+ ((installer-help-menu current-installer)
+ (lambda ()
+ ((installer-help-page current-installer)
+ (lambda _
+ (#$(compute-keymap-step 'help)
+ current-installer)))))
(list
;; Ask the user to choose a locale among those supported by
;; the glibc. Install the selected locale right away, so that
@@ -238,7 +243,8 @@ selected keymap."
(id 'keymap)
(description (G_ "Keyboard mapping selection"))
(compute (lambda _
- (#$keymap-step current-installer)))
+ (#$(compute-keymap-step 'default)
+ current-installer)))
(configuration-formatter keyboard-layout->configuration))
;; Ask the user to input a hostname for the system.
@@ -295,8 +301,8 @@ selected keymap."
(define guile-newt
;; Guile-Newt with 'form-watch-fd'.
;; TODO: Remove once a new release is out.
- (let ((commit "b3c885d42cfac327d3531c9d064939514ce6bf12")
- (revision "1"))
+ (let ((commit "c3cdeb0b53ac71aedabee669f57d44563c662446")
+ (revision "2"))
(package
(inherit (@ (gnu packages guile-xyz) guile-newt))
(name "guile-newt")
@@ -309,7 +315,7 @@ selected keymap."
(file-name (git-file-name name version))
(sha256
(base32
- "02p0bi6c05699idgx6gfkljhqgi8zf09clhzx81i8wa064s70r1y")))))))
+ "1gksd1lzgjjh1p9vczghg8jw995d22hm34kbsiv8rcryirv2xy09")))))))
(define (installer-program)
"Return a file-like object that runs the given INSTALLER."