From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:37924) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGf3X-0006gR-SA for guix-patches@gnu.org; Tue, 24 Mar 2020 04:37:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGf3V-0003ex-QV for guix-patches@gnu.org; Tue, 24 Mar 2020 04:37:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47884) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jGf3V-0003er-Mr for guix-patches@gnu.org; Tue, 24 Mar 2020 04:37:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jGf3V-00006G-LI for guix-patches@gnu.org; Tue, 24 Mar 2020 04:37:01 -0400 Subject: [bug#40207] [PATCH 1/2] installer: tests: Use a filter to select desktop-environments. References: <20200324083443.30544-1-m.othacehe@gmail.com> In-Reply-To: <20200324083443.30544-1-m.othacehe@gmail.com> Resent-Message-ID: From: Mathieu Othacehe Date: Tue, 24 Mar 2020 09:36:25 +0100 Message-Id: <20200324083626.30650-1-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40207@debbugs.gnu.org Cc: Mathieu Othacehe * 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. --- gnu/installer/tests.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gnu/installer/tests.scm b/gnu/installer/tests.scm index 6f5393e3ab..07f3121083 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 +;;; Copyright © 2020 Mathieu Othacehe ;;; ;;; 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 ((services* (filter choose-desktop-environment? services))) + (set! desktop-environments services*) + services*)) ((checkbox-list (title "Network service") (text _) (items ,services)) (filter choose-network-service? services)) -- 2.25.1