dannym pushed a commit to branch wip-installer-2
in repository guix.
commit efc4ad846d57c0289aedbf92280126aa2ae73936
Author: John Darrington <[email protected]>
Date: Sat Dec 31 16:03:22 2016 +0000
installer: Format configuration to fix width of window.
* gnu/system/installer/configure.scm (generate-guix-config): Add #:width
argument to all usages of pretty-print.
---
gnu/system/installer/configure.scm | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/gnu/system/installer/configure.scm
b/gnu/system/installer/configure.scm
index b855923..f31b7ea 100644
--- a/gnu/system/installer/configure.scm
+++ b/gnu/system/installer/configure.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 John Darrington <[email protected]>
+;;; Copyright © 2016, 2017 John Darrington <[email protected]>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -33,7 +33,6 @@
#:use-module (guix store)
#:use-module (guix utils)
-
#:export (make-configure-page))
@@ -108,7 +107,7 @@
;; Write the configuration and set the file name
(let ((cfg-port (mkstemp! (string-copy
(string-append tempdir
"/guix-config-XXXXXX")))))
- (generate-guix-config cfg-port)
+ (generate-guix-config cfg-port 79)
(set! config-file (port-filename cfg-port))
(close-port cfg-port))
@@ -129,7 +128,7 @@
(refresh (inner (page-wwin page))))
-(define (generate-guix-config p)
+(define (generate-guix-config p width)
(let ((grub-mount-point
(find-mount-device "/boot/grub"
mount-points)))
@@ -140,15 +139,15 @@
`(gnu system grub))
(gnu system nss))
- p)
+ p #:width width)
(newline p)
(pretty-print
- `(use-service-modules desktop) p)
+ `(use-service-modules desktop) p #:width width)
(newline p)
(pretty-print
- `(use-package-modules certs) p)
+ `(use-package-modules certs) p #:width width)
(newline p)
(pretty-print
@@ -183,7 +182,7 @@
`((console-keymap-service ,key-map))
`())
%desktop-services))
- (name-service-switch %mdns-host-lookup-nss)) p)))
+ (name-service-switch %mdns-host-lookup-nss)) p #:width width)))
(define (configure-page-init p)
@@ -220,7 +219,7 @@
"The following configuration has been generated for you. If you
are satisfied with it you may save it and continue. Otherwise go back and
change some options."))
(let ((p (make-window-port (inner config-window))))
- (generate-guix-config p)
+ (generate-guix-config p (getmaxx (inner config-window)))
(force-output p))
(page-set-wwin! p pr)