From patchwork Tue Aug 2 21:44:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 4173 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6857727BBEA; Tue, 2 Aug 2022 23:58:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2FFEB27BBE9 for ; Tue, 2 Aug 2022 23:58:07 +0100 (BST) Received: from localhost ([::1]:58412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIzhZ-0001uw-Su for patchwork@mira.cbaines.net; Tue, 02 Aug 2022 17:45:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIzhG-0001uR-Gk for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55554) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIzhG-0006EZ-7G for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIzhG-00039I-3i for guix-patches@gnu.org; Tue, 02 Aug 2022 17:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56898] [PATCH 02/13] read-print: Add System and Home special forms. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 02 Aug 2022 21:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56898 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56898@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 56898-submit@debbugs.gnu.org id=B56898.165947667611912 (code B ref 56898); Tue, 02 Aug 2022 21:45:02 +0000 Received: (at 56898) by debbugs.gnu.org; 2 Aug 2022 21:44:36 +0000 Received: from localhost ([127.0.0.1]:45261 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIzgp-000363-SH for submit@debbugs.gnu.org; Tue, 02 Aug 2022 17:44:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIzgn-00035O-Tn for 56898@debbugs.gnu.org; Tue, 02 Aug 2022 17:44:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55152) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIzgi-000690-MU; Tue, 02 Aug 2022 17:44:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=PjroGWoXrK2hW0kNr4EMA5saiSx1g8m0ZuXnz4an/N8=; b=goxaRnlIBzc1tLijDk9p 3ABep4/mSXLNaPPi3P/v1jVKQhghzURpYmrJg5ATI0mNIDe6gBocWPd1nIirLcXrbdBCivbCR6nyT lwmwKRBS4swpq08TJMqJQsJYlLXt2fZa88MZ8iAwkBejt+w6HvHESU8X/gxTb6ESZpr8k0lPqzMuW A90XfY9jjNZ2sZDvh4S/rYE3Ky7TkN2r+jwWCbyyoMXkl+CqT9dZX6Aa7uF7TAynajmijs+OKQSRw 8K89gSRRnp2xDhogUGLddmRN9/It28fzmUP8qWZuHDEzMoTA+dobMERPrWrAWzSMcnMIAYVAXnZqr KS1OSvowq6K5bA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52235 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIzgi-0006W4-AG; Tue, 02 Aug 2022 17:44:28 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 2 Aug 2022 23:44:08 +0200 Message-Id: <20220802214419.19013-2-ludo@gnu.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220802214419.19013-1-ludo@gnu.org> References: <20220802214419.19013-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/read-print.scm (%special-forms): Add System and Home forms. (%newline-forms): Add 'services'. --- guix/read-print.scm | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/guix/read-print.scm b/guix/read-print.scm index 69ab8ac8b3..949a713ca2 100644 --- a/guix/read-print.scm +++ b/guix/read-print.scm @@ -156,7 +156,6 @@ (define %special-forms ('unless 2) ('package 1) ('origin 1) - ('operating-system 1) ('modify-inputs 2) ('modify-phases 2) ('add-after '(((modify-phases) . 3))) @@ -167,7 +166,22 @@ (define %special-forms ('call-with-input-file 2) ('call-with-output-file 2) ('with-output-to-file 2) - ('with-input-from-file 2))) + ('with-input-from-file 2) + ('with-directory-excursion 2) + + ;; (gnu system) and (gnu services). + ('operating-system 1) + ('bootloader-configuration 1) + ('mapped-device 1) + ('file-system 1) + ('swap-space 1) + ('user-account 1) + ('user-group 1) + ('setuid-program 1) + ('modify-services 2) + + ;; (gnu home). + ('home-environment 1))) (define %newline-forms ;; List heads that must be followed by a newline. The second argument is @@ -180,7 +194,11 @@ (define %newline-forms ('git-reference '(uri origin source)) ('search-paths '(package)) ('native-search-paths '(package)) - ('search-path-specification '()))) + ('search-path-specification '()) + + ('services '(operating-system)) + ('set-xorg-configuration '()) + ('services '(home-environment)))) (define (prefix? candidate lst) "Return true if CANDIDATE is a prefix of LST."