mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
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.
This commit is contained in:
parent
62c27e09f0
commit
7a1a10dbd4
1 changed files with 8 additions and 3 deletions
|
@ -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 @@ (define* (enter-host-name+passwords port
|
|||
|
||||
(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 @@ (define* (choose-services port
|
|||
(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))
|
||||
|
|
Loading…
Reference in a new issue