summaryrefslogtreecommitdiff
path: root/gnu/installer/newt.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2022-01-15 14:50:01 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-02-02 16:46:43 +0100
commit408427a36c6545115068d5f06de2ea21407374c6 (patch)
tree45532524443880802b1eac427ce9c0e3e109169c /gnu/installer/newt.scm
parent0b9fbbb4dd24f227c9a708561ba291f6169ad2e6 (diff)
downloadguix-patches-408427a36c6545115068d5f06de2ea21407374c6.tar
guix-patches-408427a36c6545115068d5f06de2ea21407374c6.tar.gz
installer: Add installer-specific run command process.
* gnu/installer/record.scm (installer)[run-command]: Add field. * gnu/installer/utils.scm (run-command-in-installer): Add parameter. * gnu/installer.scm (installer-program): Parameterize run-command-in-installer with current installer's run-command. * gnu/installer/newt.scm (newt-run-command): New variable. (newt-installer): Use it. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Diffstat (limited to 'gnu/installer/newt.scm')
-rw-r--r--gnu/installer/newt.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm
index 61fb9cf2ca..fc851339d1 100644
--- a/gnu/installer/newt.scm
+++ b/gnu/installer/newt.scm
@@ -79,6 +79,13 @@ problem. The backtrace is displayed below~a. Please report it by email to \
(newt-finish)
(clear-screen))
+(define (newt-run-command . args)
+ (newt-suspend)
+ (clear-screen)
+ (define result (run-command args))
+ (newt-resume)
+ result)
+
(define (final-page result prev-steps)
(run-final-page result prev-steps))
@@ -150,4 +157,5 @@ problem. The backtrace is displayed below~a. Please report it by email to \
(welcome-page welcome-page)
(parameters-menu parameters-menu)
(parameters-page parameters-page)
- (dump-page dump-page)))
+ (dump-page dump-page)
+ (run-command newt-run-command)))