me
/
guix
Archived
1
0
Fork 0

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.
master
Mathieu Othacehe 2020-03-24 09:21:02 +01:00
parent 62c27e09f0
commit 7a1a10dbd4
No known key found for this signature in database
GPG Key ID: 8354763531769CA6
1 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -211,7 +212,7 @@ ROOT-PASSWORD, and USERS."
(define* (choose-services port (define* (choose-services port
#:key #:key
(desktop-environments '("GNOME")) (choose-desktop-environment? (const #f))
(choose-network-service? (choose-network-service?
(lambda (service) (lambda (service)
(or (string-contains service "SSH") (or (string-contains service "SSH")
@ -220,10 +221,14 @@ ROOT-PASSWORD, and USERS."
(lambda (service) (lambda (service)
(string-contains service "DHCP")))) (string-contains service "DHCP"))))
"Converse over PORT to choose networking services." "Converse over PORT to choose networking services."
(define desktop-environments '())
(converse port (converse port
((checkbox-list (title "Desktop environment") (text _) ((checkbox-list (title "Desktop environment") (text _)
(items _)) (items ,services))
desktop-environments) (let ((desktops (filter choose-desktop-environment? services)))
(set! desktop-environments desktops)
desktops))
((checkbox-list (title "Network service") (text _) ((checkbox-list (title "Network service") (text _)
(items ,services)) (items ,services))
(filter choose-network-service? services)) (filter choose-network-service? services))