summaryrefslogtreecommitdiff
path: root/gnu/installer/tests.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2020-03-24 09:21:02 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2020-03-26 11:53:50 +0100
commit7a1a10dbd4ef2989ea1cac111849a36c567430e3 (patch)
treea5bfc6d4f803706e9a33100fbfa7cfdb458ba940 /gnu/installer/tests.scm
parent62c27e09f0f9fb96291e5d9f1205f2b61cf3450b (diff)
installer: tests: Use a filter to select desktop-environments.
* gnu/installer/tests.scm (choose-services): Turn desktop-environments list into a choose-desktop-environment procedure. This way, it is easier to select all desktop-environments or none, in the same way as choose-network-service? and choose-network-management-tool? arguments.
Diffstat (limited to 'gnu/installer/tests.scm')
-rw-r--r--gnu/installer/tests.scm11
1 files changed, 8 insertions, 3 deletions
diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm
index 6f5393e3ab..8ae80e4d7e 100644
--- a/gnu/installer/tests.scm
+++ b/gnu/installer/tests.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -211,7 +212,7 @@ ROOT-PASSWORD, and USERS."
(define* (choose-services port
#:key
- (desktop-environments '("GNOME"))
+ (choose-desktop-environment? (const #f))
(choose-network-service?
(lambda (service)
(or (string-contains service "SSH")
@@ -220,10 +221,14 @@ ROOT-PASSWORD, and USERS."
(lambda (service)
(string-contains service "DHCP"))))
"Converse over PORT to choose networking services."
+ (define desktop-environments '())
+
(converse port
((checkbox-list (title "Desktop environment") (text _)
- (items _))
- desktop-environments)
+ (items ,services))
+ (let ((desktops (filter choose-desktop-environment? services)))
+ (set! desktop-environments desktops)
+ desktops))
((checkbox-list (title "Network service") (text _)
(items ,services))
(filter choose-network-service? services))