From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:55803) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7Nrn-0007fu-Uu for guix-patches@gnu.org; Fri, 22 Mar 2019 13:22:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h7Nrm-0002n0-QL for guix-patches@gnu.org; Fri, 22 Mar 2019 13:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41085) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h7Nrm-0002lD-Hm for guix-patches@gnu.org; Fri, 22 Mar 2019 13:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h7Nrm-0001PJ-9q for guix-patches@gnu.org; Fri, 22 Mar 2019 13:22:02 -0400 Subject: [bug#34948] [PATCH 0/3] Turn 'essential-services' into an field Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:55695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7NrF-0007cC-AT for guix-patches@gnu.org; Fri, 22 Mar 2019 13:21:30 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Fri, 22 Mar 2019 18:21:20 +0100 Message-Id: <20190322172120.10974-1-ludo@gnu.org> 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: 34948@debbugs.gnu.org Hello Guix! This is the solution that Arun and I were discussing: https://issues.guix.info/issue/28128#17 This series adds support for “self-referential records”: from the definition of a thunked field, you can use ‘this-record’ to access the record that the field belongs to. It then uses that to turn ‘essential-services’ into a thunked field of rather than an inaccessible internal procedure. This allows us to remove all the #:container? flags from (gnu system) and instead of (gnu system linux-container) simply override ‘essential-services’ as needed. Thoughts? Thanks, Ludo’. Ludovic Courtès (3): records: Allow thunked fields to refer to 'this-record'. accounts: Add default value for the 'home-directory' field of . system: Add 'essential-services' field to . doc/guix.texi | 8 ++- gnu/system.scm | 71 +++++++++----------- gnu/system/accounts.scm | 7 +- gnu/system/examples/bare-bones.tmpl | 3 +- gnu/system/examples/beaglebone-black.tmpl | 3 +- gnu/system/examples/desktop.tmpl | 3 +- gnu/system/examples/docker-image.tmpl | 3 +- gnu/system/examples/lightweight-desktop.tmpl | 3 +- gnu/system/install.scm | 3 +- gnu/system/linux-container.scm | 69 ++++++++++++------- gnu/system/vm.scm | 13 ++-- gnu/tests.scm | 5 +- gnu/tests/install.scm | 14 ++-- guix/records.scm | 24 ++++++- tests/accounts.scm | 4 -- tests/records.scm | 40 +++++++++++ 16 files changed, 169 insertions(+), 104 deletions(-) -- 2.21.0