From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 26 May 2022 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55653@debbugs.gnu.org Cc: Andrew Tropin , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , zimoun X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165355680022532 (code B ref -1); Thu, 26 May 2022 09:20:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2022 09:20:00 +0000 Received: from localhost ([127.0.0.1]:57069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nu9ex-0005rM-J9 for submit@debbugs.gnu.org; Thu, 26 May 2022 05:19:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:35406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nu9ew-0005rF-2q for submit@debbugs.gnu.org; Thu, 26 May 2022 05:19:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60778) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu9ev-0001m3-NR for guix-patches@gnu.org; Thu, 26 May 2022 05:19:57 -0400 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]:40906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nu9et-00014e-Kn; Thu, 26 May 2022 05:19:57 -0400 Received: by mail-ej1-x642.google.com with SMTP id wh22so1881281ejb.7; Thu, 26 May 2022 02:19:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:date:subject:to:cc:content-transfer-encoding:message-id :mime-version; bh=GxpEctlAdt0wUFnQfKpzU+e9a9lIOiX1Xv06mV+7FWI=; b=kLkWy8N3jhA6ZWDCzmtjJRG14VkMXotVSjOXXHs5yEkIRqDbvfw72sB/TGG+B2fQsf KaA1t4RmwjVM0+LwdLGACU3/25wr9tdCg0L28QraRXzw7vN1V2JXsvfow8T61RilTidw aCyZfmQ1Ig3etAZxLAJIANLhiN3kJw8CEvcYnPAUVdGSJwVJiGnOguycsaqOwieMpfVn mB5YUSPCcsYTntsIweSss6Sue1bqevUZWruLRd1HC1Sc0R+Y+0dFJ4W9DyROKf9Pe/HG TrsI4zsLv0sNC/bN18H2EM1FeuxWZyySmvA0oky+OGcgv9vT8qKVGcXIJCz30UF8lUut fbqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:to:cc :content-transfer-encoding:message-id:mime-version; bh=GxpEctlAdt0wUFnQfKpzU+e9a9lIOiX1Xv06mV+7FWI=; b=bXEJVTNJc59ememgVi7tAly834eZpC5P5lKwaa21v5DqSBjj/IBjhWqyfb/W2kchrg DkCIUKyDQp5GJqk7AFElHNTRrqt72c3YdrWCdPD3fu5i5lraJxQqW3D5wAVlXzdXjLdF AnKxFdsa7M/vwf7PQuAxL7Wn3qDkGMpdsBadTfn43b9JKD5mbYAr/brYnvIGlKR50s1y QfzpVbuYuZCZxOnKQOnNtPpQykkZ6BCoZToWsQL7/R4QG53N6pYyZ8msFRDG3n2+FV52 6XybBkBYRGHS0ge5doZnpARe4kfb1T5n7y4n1xrGsAj5q0TTmSoPfnYPXKZrIvpmqgbd YXBw== X-Gm-Message-State: AOAM531osU8os0S6byRHbXRfsmLCcnObYhQdl07HbLrnaEAMfLyLNYkn DwRVEDeirjy766PS249qznh3fS4k4Jc= X-Google-Smtp-Source: ABdhPJxHc/0Got+LrL1FC330LQpbff3pMYE+BRSVMYonql6fDZAGnOAih6OCxocxkGJA64XysPSF3A== X-Received: by 2002:a17:907:8a01:b0:6ff:8b8:ca85 with SMTP id sc1-20020a1709078a0100b006ff08b8ca85mr9985812ejc.602.1653556791717; Thu, 26 May 2022 02:19:51 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id e12-20020a170906374c00b006fec41b21e1sm332952ejc.171.2022.05.26.02.19.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 May 2022 02:19:51 -0700 (PDT) From: Liliana Marie Prikler Date: Thu, 26 May 2022 11:01:02 +0200 Content-Transfer-Encoding: 8bit Message-ID: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x642.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PP_MIME_FAKE_ASCII_TEXT=0.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.5 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) * guix/profiles.scm (%profile, package-compatibility-helper): New variables. (profile): Implement in terms of package-compatibility-helper. --- Hi Guix, this is a first step towards managing multiple profiles via Guix Home. It makes it so that regular Guix profiles can more easily be specified, though I'm not quite sure whether the mlet of packages->profile-entry should not also be used here. In any case, with this it should now be relatively easy for users to specify profiles such as (profile (name "emacs") (packages emacs emacs-magit emacs-org ...)) (profile (name "r") (packages r r-plyr emacs emacs-ess ...)) (profile (name "python") (packages python python-beautifulsoup4 ...)) ... What's still missing is a way to link them up with /var/guix/profiles/per-user and $HOME – for the latter, there would be a home-*-service-type. WDYT? guix/profiles.scm | 23 ++++++++++++++++++++++- tests/profiles.scm | 16 ++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index bf50c00a1e..fbc343c456 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -1974,7 +1974,7 @@ (define builder (manifest-entries manifest)))))))) ;; Declarative profile. -(define-record-type* profile make-profile +(define-record-type* %profile make-profile profile? (name profile-name (default "profile")) ;string (content profile-content) ; @@ -1987,6 +1987,27 @@ (define-record-type* profile make-profile (relative-symlinks? profile-relative-symlinks? ;Boolean (default #f))) +(define-syntax package-compatibility-helper + (syntax-rules (packages manifest) + ((_ () (fields ...)) + (%profile fields ...)) + ((_ ((packages exp) rest ...) (others ...)) + (package-compatibility-helper + (rest ...) + (others ... (content (packages->manifest + (delete-duplicates exp eq?)))))) + ((_ ((manifest exp) rest ...) (others ...)) + (package-compatibility-helper + (rest ...) + (others ... (content exp)))) + ((_ (field rest ...) (others ...)) + (package-compatibility-helper (rest ...) (others ... field))))) + +(define-syntax-rule (profile fields ...) + "Build a record, automatically converting 'packages' or 'manifest ' +field specifications to 'content'." + (package-compatibility-helper (fields ...) ())) + (define-gexp-compiler (profile-compiler (profile ) system target) "Compile PROFILE to a derivation." (match profile diff --git a/tests/profiles.scm b/tests/profiles.scm index d59d75985f..970a34b6cc 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -272,6 +272,22 @@ (define transform1 (manifest-pattern (name name)))) '("gcc" "binutils" "glibc" "coreutils" "grep" "sed")))) +(test-assert "profile syntax sugar" + (let ((p1 (dummy-package "p1")) + (p2 (dummy-package "p2"))) + (define (profile=? . profiles) + (define (manifest=? . manifests) + ;; Since we're using the same packages, we could also compare via eq? + (apply list= manifest-entry=? (map manifest-entries manifests))) + (apply manifest=? (map profile-content profiles))) + + (profile=? + (profile (content (manifest + (map package->manifest-entry (list p1 p2))))) + (profile (content (packages->manifest (list p1 p2)))) + (profile (manifest (packages->manifest (list p1 p2)))) + (profile (packages (list p1 p2)))))) + (test-assertm "profile-derivation" (mlet* %store-monad ((entry -> (package->manifest-entry %bootstrap-guile)) -- 2.36.1 From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: andrew@trop.in Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 May 2022 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: liliana.prikler@gmail.com, 55653@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , zimoun X-Debbugs-Original-To: Liliana Marie Prikler , guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16536551934634 (code B ref -1); Fri, 27 May 2022 12:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 27 May 2022 12:39:53 +0000 Received: from localhost ([127.0.0.1]:33061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuZFx-0001Cf-Bv for submit@debbugs.gnu.org; Fri, 27 May 2022 08:39:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:55428) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nuZFv-0001CY-OS for submit@debbugs.gnu.org; Fri, 27 May 2022 08:39:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuZFv-0006HO-Ec for guix-patches@gnu.org; Fri, 27 May 2022 08:39:51 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:46125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuZFs-0000gQ-RH; Fri, 27 May 2022 08:39:51 -0400 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id 6C6D11BF20B; Fri, 27 May 2022 12:39:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1653655183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hFs3yjdLLx0HROUc31uwOQFenoYVQ1vQMP3gjHFTvOM=; b=FOunFF823tKtdK4SZjEfUlK4f7tiV+B4wcKsFB97IozVLvUBIKFEAVudWdUclIs6YODa8Y 6GnkNwDhkT2xzgtNXf91m9PPhKIMbOE2jMpv/IwQ1G3b2lXbhv4JzGOEKVlJ5aoXzPkKRg LMAYhvHJWhPHg6HSS9prTy/bxLagDMcEus0duN9iCUWkLTrmg5IjSy04wtEEUUxQOxo1Wp UvHx2BMwssgyHL72BpLDS69AqccGJoXMAS99kaa4+olTCmC2b9BGg+g+WUpeH+fnrChPrr EdDxB+KHBWS1L9kuin8QoHeCo8H5yZydbzroouJR0iZTI0Xsk8b1iTX7L+D0zQ== From: andrew@trop.in In-Reply-To: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> Date: Fri, 27 May 2022 15:39:38 +0300 Message-ID: <87tu9bqhdh.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=217.70.183.201; envelope-from=andrew@trop.in; helo=relay8-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.7 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.7 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2022-05-26 11:01, Liliana Marie Prikler wrote: > * guix/profiles.scm (%profile, package-compatibility-helper): New variabl= es. > (profile): Implement in terms of package-compatibility-helper. > --- > Hi Guix, > > this is a first step towards managing multiple profiles via Guix Home. > It makes it so that regular Guix profiles can more easily be specified, t= hough > I'm not quite sure whether the mlet of packages->profile-entry should not= also > be used here. The sugar looks reasonable to me. > > In any case, with this it should now be relatively easy for users to spec= ify > profiles such as > (profile (name "emacs") (packages emacs emacs-magit emacs-org ...)) > (profile (name "r") (packages r r-plyr emacs emacs-ess ...)) > (profile (name "python") (packages python python-beautifulsoup4 ...)) > ... > What's still missing is a way to link them up with /var/guix/profiles/per= -user Don't think that they have to be linked to /var/guix/profiles/per-user, as mentioned earlier profiles built for the home environment should be a part of home environment, link to the profile will be inside home-environment directory: /var/guix/profiles/per-user/bob/guix-home/profiles/PROFILE_NAME links in /var/guix/profiles/per-user needed for switching between profile versions, it's not possible in case profile is a part of home environment, otherwise home environment will stop being reproducible. > and $HOME =E2=80=93 for the latter, there would be a home-*-service-type. Yep, can be done by home-files-* and symlink-manager I guess. > > WDYT? > > guix/profiles.scm | 23 ++++++++++++++++++++++- > tests/profiles.scm | 16 ++++++++++++++++ > 2 files changed, 38 insertions(+), 1 deletion(-) > > diff --git a/guix/profiles.scm b/guix/profiles.scm > index bf50c00a1e..fbc343c456 100644 > --- a/guix/profiles.scm > +++ b/guix/profiles.scm > @@ -1974,7 +1974,7 @@ (define builder > (manifest-entries manifest)))= ))))) >=20=20 > ;; Declarative profile. > -(define-record-type* profile make-profile > +(define-record-type* %profile make-profile > profile? > (name profile-name (default "profile")) ;string > (content profile-content) ; > @@ -1987,6 +1987,27 @@ (define-record-type* profile make-profile > (relative-symlinks? profile-relative-symlinks? ;Boolean > (default #f))) >=20=20 > +(define-syntax package-compatibility-helper > + (syntax-rules (packages manifest) > + ((_ () (fields ...)) > + (%profile fields ...)) > + ((_ ((packages exp) rest ...) (others ...)) > + (package-compatibility-helper > + (rest ...) > + (others ... (content (packages->manifest > + (delete-duplicates exp eq?)))))) > + ((_ ((manifest exp) rest ...) (others ...)) > + (package-compatibility-helper > + (rest ...) > + (others ... (content exp)))) > + ((_ (field rest ...) (others ...)) > + (package-compatibility-helper (rest ...) (others ... field))))) > + > +(define-syntax-rule (profile fields ...) > + "Build a record, automatically converting 'packages' or 'man= ifest ' > +field specifications to 'content'." > + (package-compatibility-helper (fields ...) ())) > + > (define-gexp-compiler (profile-compiler (profile ) system targe= t) > "Compile PROFILE to a derivation." > (match profile > diff --git a/tests/profiles.scm b/tests/profiles.scm > index d59d75985f..970a34b6cc 100644 > --- a/tests/profiles.scm > +++ b/tests/profiles.scm > @@ -272,6 +272,22 @@ (define transform1 > (manifest-pattern (name name)))) > '("gcc" "binutils" "glibc" "coreutils" "grep" "sed")))) >=20=20 > +(test-assert "profile syntax sugar" > + (let ((p1 (dummy-package "p1")) > + (p2 (dummy-package "p2"))) > + (define (profile=3D? . profiles) > + (define (manifest=3D? . manifests) > + ;; Since we're using the same packages, we could also compare vi= a eq? > + (apply list=3D manifest-entry=3D? (map manifest-entries manifest= s))) > + (apply manifest=3D? (map profile-content profiles))) > + > + (profile=3D? > + (profile (content (manifest > + (map package->manifest-entry (list p1 p2))))) > + (profile (content (packages->manifest (list p1 p2)))) > + (profile (manifest (packages->manifest (list p1 p2)))) > + (profile (packages (list p1 p2)))))) > + > (test-assertm "profile-derivation" > (mlet* %store-monad > ((entry -> (package->manifest-entry %bootstrap-guile)) =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmKQxooACgkQIgjSCVjB 3rC8rw/7BTxMeH87Sx38URbnZHN1rzM3klKOZLHRAc9Kx7YVmnyFvhBYDsRqzYvh JkaxWGEiKcYV2Y3pwcOM6mndXd8nFGpQvbDE6SwZWcEaVOEYaJoNl6XFx8q9CXw0 u6PVYmL2iKZzVahPXdC4qv8woRobSyS5f74yxYVuAFtGxUIG+6OvgC7Ua3rG7aLI pX3iTMapnEgvrHvDp0mR4W2Ty4uydWs9hwkqUW4XR4YJ2p1mOMw8tk/FRHcg/Wqf QfIJ3oUUW7Vdltc709a29BMW2+vYdXvBGU7o0jUvuNEltpu4t5Sa291LN6+cVaeu E36PeeuTPH/tIS0GuO5CCKv26yu72yD1OPlGl1c6b6y/M/oHXdhNLuq+t6/JyGaU S5IUANFEoxO57fpfqdEOjj4NgStAPdOuF+xUtdYlUT8oKOxtqlKXkdxCLn3AqW0w Gw1NOUo6trrucvcrOjR6h+7gpr21RzNC6mmqTEksFwW2mdbrg5pN5Q5tCtNmgw7m mh4Pr+PH8DSD4ngoTbZbSm/gpS5kSsGfXYLijl+feVg0I6LeFlaz7e4BZHlkdh4+ ubRo+c1/o5sFxjEMimQ3Znnz0vYDnjlxjtPgOg/HlazH0Ub/795DVkpGoudybFCT +32LY2FU8mBRw1eLHRhpWrNksxbDCiJJ/RvuccConR+jpxXqt/A= =ijru -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 May 2022 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.1654004861301 (code B ref 55653); Tue, 31 May 2022 13:48:02 +0000 Received: (at 55653) by debbugs.gnu.org; 31 May 2022 13:47:41 +0000 Received: from localhost ([127.0.0.1]:47140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw2Dj-0008WP-0S for submit@debbugs.gnu.org; Tue, 31 May 2022 09:47:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw2De-0008Vp-TP for 55653@debbugs.gnu.org; Tue, 31 May 2022 09:47:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37632) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nw2DZ-00069A-Eq; Tue, 31 May 2022 09:47:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=CwCptLf2n1OtbFTGf//rVV/yXyUDL4deBp8a5R6Cqgw=; b=A/G/8UyfzIpYuM0etckx vpVwHxykzFf78I/06RBuh4UVx+Hhyhqb3cXbFbfMLogCtBqvNOD/BZKegHzvh7P8rYnvRMe232Wkx hc6dN2ruhnBp+6e75bqeZjTWD63H1fdJ7VnxbX46w2XL1EQPJZu7wsRoRUGhMnkkCyBhUxCVRwVle jgHoyHDl35UEHd/EuWXY2Bz3DFM9YIOOg3YfRJtXxycpRWO+aZR6wyg482tfg7iY7OcU4dIbXMeqz FLyfpSAT9TqGjzYimLIgKs/SltY97mRpTXdo4UluHPsZn38txwgTRKc2ZLMioFFbWqoomlsX19dIA zEEugqrX9QM5XA==; Received: from nat-eduroam-36-gw-01-bso.bordeaux.inria.fr ([194.199.1.36]:41606 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nw2DZ-0002eK-2j; Tue, 31 May 2022 09:47:29 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> Date: Tue, 31 May 2022 15:47:25 +0200 In-Reply-To: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> (Liliana Marie Prikler's message of "Thu, 26 May 2022 11:01:02 +0200") Message-ID: <87sfopyfte.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello! Liliana Marie Prikler skribis: > * guix/profiles.scm (%profile, package-compatibility-helper): New variabl= es. > (profile): Implement in terms of package-compatibility-helper. > --- > Hi Guix, > > this is a first step towards managing multiple profiles via Guix Home. > It makes it so that regular Guix profiles can more easily be specified, t= hough > I'm not quite sure whether the mlet of packages->profile-entry should not= also > be used here. > > In any case, with this it should now be relatively easy for users to spec= ify > profiles such as > (profile (name "emacs") (packages emacs emacs-magit emacs-org ...)) > (profile (name "r") (packages r r-plyr emacs emacs-ess ...)) > (profile (name "python") (packages python python-beautifulsoup4 ...)) > ... So the goal is to make things slightly more concise than: (profile (content (packages->manifest (list =E2=80=A6)))) right? We don=E2=80=99t have syntactic sugar like this elsewhere, and I would pref= er to remain consistent here. However, if that helps, we could have a procedure, like: (define (packages->profile name packages) (profile (name name) =E2=80=A6)) Thoughts? Ludo=E2=80=99. From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 31 May 2022 18:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.16540204435574 (code B ref 55653); Tue, 31 May 2022 18:08:02 +0000 Received: (at 55653) by debbugs.gnu.org; 31 May 2022 18:07:23 +0000 Received: from localhost ([127.0.0.1]:48846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6H5-0001Rq-GF for submit@debbugs.gnu.org; Tue, 31 May 2022 14:07:23 -0400 Received: from mail-ej1-f68.google.com ([209.85.218.68]:43799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nw6Gz-0001RY-1l for 55653@debbugs.gnu.org; Tue, 31 May 2022 14:07:22 -0400 Received: by mail-ej1-f68.google.com with SMTP id m20so28130256ejj.10 for <55653@debbugs.gnu.org>; Tue, 31 May 2022 11:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=QeFt9gvn4kyhUOXWrw9ppIaqJ5FJJ+ULqtkvmtsU/lw=; b=j3FHVydE8OykxvRTclUEIWdVS+y39wvipAuEa63ENI1eRe2Q9Zn2Qeds9O5vrE7ygH wyaHtWsViljcwZ/hsmrHquhhVYsbcsGFH2GuQ1Bjc2h/CEA4Ec6LwSFCDz+JDbAcG/h4 /c1N7L6poLm2x/+X49LQloqCR0eoIZDwBLVkGOCcCkbd8jzFlrr3AXBxY7bl9RhQ3nmz dpXFzXHZWGWbEJacWi3ubjgZKyoxoqvCrvM1kb2C3bpqhmI81fRWBqpKG8XVb8K4VU6E YXvp/nVoqaOOgmqjE83dSYvbCA8873Wtg/CbDipIspKYt/EhrymPw9M9Aw4C5z5OZH1D qwpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=QeFt9gvn4kyhUOXWrw9ppIaqJ5FJJ+ULqtkvmtsU/lw=; b=CHrLJX5Egs3bhn5pqvTAkd14aeXPVYvOil+QldYji2/JJqvWHbRNRm3KiAyenH1i+P sAHj8CtlF/PUyjjAEac8DZCj9EDHYPNMA0C2LTNFk5+pF+GJ5VKNuvO4XlXFGm8zbDYQ A0+DDcZwTvRou/EK35OmnafmTsVx27mf78aqfDtm9i2sp8Wwz9CcMPjAq+DqrcDZkaUI dsmxN+EivYYfVUolAb+7+icME3fwUojb2uoLUY0ovPUV5dh/K0++L70djqWQwpmgwAnl BJ4RG28h9ounGvTeen6iMgNNlnUDViOuWwx9cAHnBe1SA0bGGRUTWlEZmRHJx60wlucu NBbg== X-Gm-Message-State: AOAM532YTAFvJ8mAiIhV9NXNifLQw38W3QToeSMvJ92qR/ZltkNRFJPp 1OfBKqlZ7Z8PoscjFD0YL6Q= X-Google-Smtp-Source: ABdhPJyirzuHinJjSeOR1xsvi+ipvx6YxfJRZ/56fj5MF88a8LCACByVvgKOfKl5DqghsXBl/e3j3Q== X-Received: by 2002:a17:907:2d07:b0:6ff:7867:82f2 with SMTP id gs7-20020a1709072d0700b006ff786782f2mr10712845ejc.708.1654020431188; Tue, 31 May 2022 11:07:11 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id m8-20020a056402430800b0042de29d8fc0sm1690327edc.94.2022.05.31.11.07.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 11:07:10 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Tue, 31 May 2022 20:07:09 +0200 In-Reply-To: <87sfopyfte.fsf@gnu.org> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Dienstag, dem 31.05.2022 um 15:47 +0200 schrieb Ludovic Courtès: > So the goal is to make things slightly more concise than: > >   (profile (content (packages->manifest (list …)))) > > right? More or less. However, I also feel that "content" is somewhat confusing if it were to be user-facing so I added a syntactic manifest noop as well. > We don’t have syntactic sugar like this elsewhere, and I would prefer > to remain consistent here.   We do have origin sha256, which sets both hash-algo and hash-content, so it's not unprecedented in my opinion. > However, if that helps, we could have a procedure, like: > >   (define (packages->profile name packages) >     (profile (name name) …)) > > Thoughts? I do think syntactic constructors feel better here, because the end goal would be embedding things in (thunked) configuration fields. Having a procedure might be acceptable, but feels more clunky in the context of Guix. Chees From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 19:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165411264515958 (code B ref 55653); Wed, 01 Jun 2022 19:45:01 +0000 Received: (at 55653) by debbugs.gnu.org; 1 Jun 2022 19:44:05 +0000 Received: from localhost ([127.0.0.1]:51929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUGC-00049K-Nk for submit@debbugs.gnu.org; Wed, 01 Jun 2022 15:44:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUGB-00048h-Fj for 55653@debbugs.gnu.org; Wed, 01 Jun 2022 15:44:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwUG5-0007gy-G4; Wed, 01 Jun 2022 15:43:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=IDqRAJE5zksDDwA66Q8qAzagLjWV+iHCVxsgo24rIBU=; b=hyOie6xTzsiW2Ur0vhj5 Y1UAqGiFMzzosiAY8K0JSvM2pkWyPXLfR9vscB7f+XF2RB/BxSWNa7dfK3MYAsILchlWB3kdP8cNX hJ58Drnb3dapLOf3rRt4Fmcpd5HgVhM4IKEL+eqDXl+Yyzx+J4Fh7+fIKptyJ/t4kpYJOaEuQ75er KpDu+EbLkA7G6blRIh7YkU1xONKvYhtfS0ByJv+UBFRVs+wCKhaSGoVk3/DczX75fd+J0iIC1TmPD bh53gk236Ix4p+ZTT6EqEdCpjgHF6NDcTnGg196fgpVQgnapIWSG69ZeywQZ1Qsf+M52bM/wJIbJ7 AoRGxwHr+J2CHA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56612 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwUG5-0002x3-3W; Wed, 01 Jun 2022 15:43:57 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 13 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Pois X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 01 Jun 2022 21:43:54 +0200 In-Reply-To: (Liliana Marie Prikler's message of "Tue, 31 May 2022 20:07:09 +0200") Message-ID: <87zgiwtbid.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Liliana Marie Prikler skribis: > Am Dienstag, dem 31.05.2022 um 15:47 +0200 schrieb Ludovic Court=C3=A8s: >> So the goal is to make things slightly more concise than: >>=20 >> =C2=A0 (profile (content (packages->manifest (list =E2=80=A6)))) >>=20 >> right? > More or less. However, I also feel that "content" is somewhat > confusing if it were to be user-facing so I added a syntactic manifest > noop as well. OK. >> We don=E2=80=99t have syntactic sugar like this elsewhere, and I would p= refer >> to remain consistent here.=C2=A0=C2=A0 > We do have origin sha256, which sets both hash-algo and hash-content, > so it's not unprecedented in my opinion. =E2=80=98sha256=E2=80=99 is a backward-compatibility hack for =E2=80=98cont= ent-hash=E2=80=99, so it=E2=80=99s a bit different in my view. To be clear, what I meant is that record construction always look like this: (constructor (field1 value1) (field2 value2)) whereas here the proposal (IIUC) is: (constructor (field1 several values that get bundled together magically)) >> However, if that helps, we could have a procedure, like: >>=20 >> =C2=A0 (define (packages->profile name packages) >> =C2=A0=C2=A0=C2=A0 (profile (name name) =E2=80=A6)) >>=20 >> Thoughts? > I do think syntactic constructors feel better here, because the end > goal would be embedding things in (thunked) configuration fields.=20 > Having a procedure might be acceptable, but feels more clunky in the > context of Guix. To me, =E2=80=98packages->profile=E2=80=99 doesn=E2=80=99t look any more cl= unky than =E2=80=98packages->manifest=E2=80=99 or similar procedures. Do you think a procedure like this would address the verbosity problem that prompted you to propose this patch? Thanks, Ludo=E2=80=99. From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165411451527674 (code B ref 55653); Wed, 01 Jun 2022 20:16:02 +0000 Received: (at 55653) by debbugs.gnu.org; 1 Jun 2022 20:15:15 +0000 Received: from localhost ([127.0.0.1]:51968 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUkN-0007CH-Dd for submit@debbugs.gnu.org; Wed, 01 Jun 2022 16:15:15 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:46061) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwUkM-0007Bw-3X for 55653@debbugs.gnu.org; Wed, 01 Jun 2022 16:15:14 -0400 Received: by mail-ed1-f65.google.com with SMTP id er5so3649569edb.12 for <55653@debbugs.gnu.org>; Wed, 01 Jun 2022 13:15:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=an4iLilFua7LgsF2maBonrm6s0lc1qOrcUYYRJGhEy0=; b=Ksl/3m1V1WjmELDiWEV16G/VhsJUhs/EHClJa6UaYAlYWTzgQm+Zwak6egr2vjoKlr BHcvSca2FNyKIVTwv2RrVh4DFqQ89gJd3+nHSbFrcJ3KltarpZij66Mf/QbmApzh7nsM o2DnldqQy8Njd30PrdYyoVrua5Co95OauZ+Iu8s7LsSjKesVnhWGr/rOz6Kehms/YK83 xyHDu+WsVuxJh/+KZ7f0cOj7Fc85F8UhpoRiesSAAtgjC25LBcof5KebvmVv2jODUnnY qafVcSwq9iv7tOVsjfEtFdxDXci/ZtYmQsKUB3jWWtwqcMYBvkLrlJRf1kdGe1SqlJlp E6Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=an4iLilFua7LgsF2maBonrm6s0lc1qOrcUYYRJGhEy0=; b=7ml7sMM/rr3NoWPBuXyRMTm4ad8WjJfZ5B4DnPAPoyFMDjc668woCLhxL4XUzJ0CBz wZ5YA2P2reLfRoecuHFSnSDgYu+jHnVyOVToAKAEGFmbvHvDFIDHs1CMdx7uj9/zKGb8 pd+NUFfWJoNYYcoafNCefNTIq04tyyxrt9Bs1/z8cBYOJCMrmUYa4pUapxipqouFRujD 1aeNkA9NtbWk3ZRrco58S7QtpJbtj3adkSvzFjZk1zifgCq+oD28uruSqbRtU0rfCij+ GwKjUsdW45qp44f0dmt0tntd67IT9erggfPAETrQ6/VKAHOrARcbQTK6NTTInBZ5j8pJ KslQ== X-Gm-Message-State: AOAM531lFlXqT43jzdr9KvdKWFumWHljuF0iWHXMYo3B8rNO/W1PsBZh SDJ6rnLUbe+56DOaZUG2W1U= X-Google-Smtp-Source: ABdhPJwU4wUqA6JUeHicekeUWGZ1N8bGFID31ZtjkefMLIkSagf7Okkc3EdCdX8lMsf9sLgoGrECtA== X-Received: by 2002:a05:6402:1cc1:b0:413:2b12:fc49 with SMTP id ds1-20020a0564021cc100b004132b12fc49mr1638980edb.118.1654114508078; Wed, 01 Jun 2022 13:15:08 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id r18-20020aa7cfd2000000b0042dc8dd59c7sm1478316edy.51.2022.06.01.13.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:15:07 -0700 (PDT) Message-ID: <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> From: Liliana Marie Prikler Date: Wed, 01 Jun 2022 22:15:06 +0200 In-Reply-To: <87zgiwtbid.fsf@gnu.org> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Am Mittwoch, dem 01.06.2022 um 21:43 +0200 schrieb Ludovic Courtès: > [...] > > > > > > We don’t have syntactic sugar like this elsewhere, and I would > > > prefer to remain consistent here.   > > We do have origin sha256, which sets both hash-algo and hash- > > content, so it's not unprecedented in my opinion. > > ‘sha256’ is a backward-compatibility hack for ‘content-hash’, so it’s > a bit different in my view. > > To be clear, what I meant is that record construction always look > like this: > >   (constructor >     (field1 value1) >     (field2 value2)) > > whereas here the proposal (IIUC) is: > >   (constructor >     (field1 several values that get bundled together magically)) If it reads like that, then that's probably a mistake somewhere. My actual proposal to allow both of the following: (package other-fields ... (manifest some-manifest)) (package other-fields ... (packages (list bash coreutils emacs ...))) > > > However, if that helps, we could have a procedure, like: > > > > > >   (define (packages->profile name packages) > > >     (profile (name name) …)) > > > > > > Thoughts? > > I do think syntactic constructors feel better here, because the end > > goal would be embedding things in (thunked) configuration fields. > > Having a procedure might be acceptable, but feels more clunky in > > the context of Guix. > > To me, ‘packages->profile’ doesn’t look any more clunky than > ‘packages->manifest’ or similar procedures. > > Do you think a procedure like this would address the verbosity > problem that prompted you to propose this patch? I don't think it does tbh. We currently have two implementations of packages->profile-entry, one for Guix System, one for Guix Home, which at the time of writing are exactly the same. My use case of naming profiles would be served by such a procedure, but using a syntactic constructor has other benefits in that all of the fields of the profile become accessible. That means that users could (once profile management via Guix Home is implemented) for instance run less hooks or additional hooks for certain profiles, allow collisions, use relative symlinks, etc. for basically free, not to mention that changes which break record ABI (such as added fields) get promoted directly through syntax but not through a plain procedure. Cheers From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 20:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Andrew Tropin , 55653@debbugs.gnu.org, zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165411566229746 (code B ref 55653); Wed, 01 Jun 2022 20:35:01 +0000 Received: (at 55653) by debbugs.gnu.org; 1 Jun 2022 20:34:22 +0000 Received: from localhost ([127.0.0.1]:52003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwV2s-0007ji-FD for submit@debbugs.gnu.org; Wed, 01 Jun 2022 16:34:22 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:51884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwV2q-0007jW-Rl for 55653@debbugs.gnu.org; Wed, 01 Jun 2022 16:34:21 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id dwaJ270084UW6Th01waJJv; Wed, 01 Jun 2022 22:34:19 +0200 Message-ID: <01eb4bc70367cfeb2378867abe561542e0f07e01.camel@telenet.be> From: Maxime Devos Date: Wed, 01 Jun 2022 22:34:18 +0200 In-Reply-To: <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7sXwMrvC31Eke1BL67XF" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654115659; bh=2hgx8vt0XhPtUR/tMGs2SSCHfEY6qppqGucJEXQdsbY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=oomcOge9Ke/29ATiBr5ylRJjdh+ctilzrf05crK4TUURcPE/EfjGpmbmi291aQAtg qN6sejx2ttMKbPbZf4FfICSK36YmoAOHRTV0AIC73FOT5LU89nKHvyyzyvNh0tbEoT ntT09XHeHOmnwYjTWQXu+66fKAPmTVKHJ8AW65Bwui85zkyTwxisk08LQ2DHq+DRzW rXbxeFMnHTtUK7zgF7Gz5uuCAXDlsCHr/sHKGuX7P0ziFrDTVxz0Xks1pOg51juxZo LTrKgHUtjsoNmlM2+I7H5MIOcZcT1Z1zt06103rowJI4QN/94poN0o6f+jKeAenpMK QR37JQkcn3ERw== X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-7sXwMrvC31Eke1BL67XF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Liliana Marie Prikler schreef op wo 01-06-2022 om 22:15 [+0200]: > not to mention that changes which > break record ABI (such as added fields) get promoted directly through > syntax but not through a plain procedure. Using a procedure instead of the record construction macro would make the ABI stable (*). ABI-wise, wouldn't a stable ABI (regular procudure) be better than an unstable ABI? There might be some benefits for a macro concerning readability or such, but I don't see any benefits ABI-wise. (*) assuming no inlining. Greetings, Maxime. --=-7sXwMrvC31Eke1BL67XF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpfNShccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sQYAQDHGJ3tji1kVSu6Lkxl957bsgvZ l28lCNiEIU+gdZkcDQD/StkWaEL1ZSpO1U6tD+DdGR8K+O/oEavIDX/fPLkv6Qc= =N0Rx -----END PGP SIGNATURE----- --=-7sXwMrvC31Eke1BL67XF-- From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jun 2022 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Liliana Marie Prikler Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.16541767864705 (code B ref 55653); Thu, 02 Jun 2022 13:34:02 +0000 Received: (at 55653) by debbugs.gnu.org; 2 Jun 2022 13:33:06 +0000 Received: from localhost ([127.0.0.1]:53147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkwk-0001Dp-5i for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:33:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkwh-0001DL-Ti for 55653@debbugs.gnu.org; Thu, 02 Jun 2022 09:33:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkwc-0001P8-If; Thu, 02 Jun 2022 09:32:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Cj+P7Mdr6kM6ZkBBispG1OQI2F9t40Lk+KoSG0c2yZo=; b=PavFnhMs+hMasbBIFLFK xIpOHqA8mbQiM49N7zJvBOb3yg3DA9NIc1Z9Zyx7Njlt78Tp7irbfhaFisrFOd0pljGV5hc6Lc4ET 7SxU75gCSkWtZ9PnW6GfpnAZcQqkPtz4/xvPdZW2b0VbzqjqiDEGiMUvj3rFXlq6Kcg2sAOXNnmTg 2UFA0e9Yll65ljeZNP8Hmb/8jaZ99xQCA5n/nur+z20obQ6cvbDWSiEf0Dnd2Pl2EjPsBgEUbohNa GC05+e2CyuUxU8B5zuzK0d6KMAVfLSzr3W8R5K9gX7CfQiGrS9XQVCkgdGmpQ6KqeMhpxdAQidR0t P2FzulbocRax/w==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52984 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkwc-0005F4-6L; Thu, 02 Jun 2022 09:32:58 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Prairial an 230 de la =?UTF-8?Q?R=C3=A9volution,?= jour de l'Acacia X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 02 Jun 2022 15:32:56 +0200 In-Reply-To: <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> (Liliana Marie Prikler's message of "Wed, 01 Jun 2022 22:15:06 +0200") Message-ID: <87sfonp4vr.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hallo! Liliana Marie Prikler skribis: > If it reads like that, then that's probably a mistake somewhere. My > actual proposal to allow both of the following: > > (package > other-fields ... > (manifest some-manifest)) > (package=20 > other-fields ... > (packages (list bash coreutils emacs ...))) Oh OK, I got it wrong, sorry. Still I=E2=80=99m not a fan of having syntax that looks like a field but is= not an actual field, if we can avoid it. I prefer to expose the data structure as it exists and, if needed, to build abstractions on top of it. (The ABI issue that Maxime mention is real but I don=E2=80=99t think i= t=E2=80=99s a big problem in practice.) >> > > However, if that helps, we could have a procedure, like: >> > >=20 >> > > =C2=A0 (define (packages->profile name packages) >> > > =C2=A0=C2=A0=C2=A0 (profile (name name) =E2=80=A6)) >> > >=20 >> > > Thoughts? >> > I do think syntactic constructors feel better here, because the end >> > goal would be embedding things in (thunked) configuration fields.=20 >> > Having a procedure might be acceptable, but feels more clunky in >> > the context of Guix. >>=20 >> To me, =E2=80=98packages->profile=E2=80=99 doesn=E2=80=99t look any more= clunky than >> =E2=80=98packages->manifest=E2=80=99 or similar procedures. >>=20 >> Do you think a procedure like this would address the verbosity >> problem that prompted you to propose this patch? > I don't think it does tbh. We currently have two implementations of > packages->profile-entry, one for Guix System, one for Guix Home, which > at the time of writing are exactly the same. Looks like we could start by factorizing it. :-) > My use case of naming profiles would be served by such a procedure, > but using a syntactic constructor has other benefits in that all of > the fields of the profile become accessible. That means that users > could (once profile management via Guix Home is implemented) for > instance run less hooks or additional hooks for certain profiles, > allow collisions, use relative symlinks, etc. for basically free, not > to mention that changes which break record ABI (such as added fields) > get promoted directly through syntax but not through a plain > procedure. This is an argument (and probably a good one) in favor of using records. I don=E2=80=99t read it as an argument in favor of the =E2=80=98packages=E2=80=99 pseudo field though? Thanks, Ludo=E2=80=99. From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jun 2022 15:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Liliana Marie Prikler Cc: Andrew Tropin , 55653@debbugs.gnu.org, zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165418248615888 (code B ref 55653); Thu, 02 Jun 2022 15:09:01 +0000 Received: (at 55653) by debbugs.gnu.org; 2 Jun 2022 15:08:06 +0000 Received: from localhost ([127.0.0.1]:54396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwmQf-00048C-Fa for submit@debbugs.gnu.org; Thu, 02 Jun 2022 11:08:05 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwmQZ-00047h-5V for 55653@debbugs.gnu.org; Thu, 02 Jun 2022 11:08:03 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id eF7w2700i4UW6Th01F7xtu; Thu, 02 Jun 2022 17:07:57 +0200 Message-ID: <49464e89e7ef5970577319264f1d37d17dc44faf.camel@telenet.be> From: Maxime Devos Date: Thu, 02 Jun 2022 17:07:46 +0200 In-Reply-To: <87sfonp4vr.fsf@gnu.org> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> <87sfonp4vr.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-RiM3BdA/Np6MSgdv+kP3" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1654182477; bh=qTFGXaDoMquR4z+YrZG033YtrCILHUh8E4Mi67IOA+8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=HXurD6SsapA7jZTKJWn4UV36NPWDcA4n9Ta6RTN72Zd1ULF12/lA2cOr6yJ7HSALp 2sR4wXZ2pL0tgfZdnNFhm7VU4b2OngEurZ6aCvEeR8EdqFxLhO1JjX40qWBY3R2aX3 lu6tJCRN35WnCKbU8hHHEiapxphQH6geq98JJZhZ1VEGU9McqgX4OLWLj+Z+w1/MS/ HG20JhFnz5WUziDYjhGrKqMfSiDjMecS3dDnX+OKTAryBejk1R8UehfFIHRJIdx1BJ 6eNkbPA4wL7K4vgL3mJ0uAvxjB9iGdhyqbT6HcANHlWbFSscKOycs1b/RAkvJJpOnh 3himCKVFXfPPQ== X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-RiM3BdA/Np6MSgdv+kP3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op do 02-06-2022 om 15:32 [+0200]: > Still I=E2=80=99m not a fan of having syntax that looks like a field but = is not > an actual field, if we can avoid it.=C2=A0 I prefer to expose the data > structure as it exists and, if needed, to build abstractions on top of > it.=C2=A0 (The ABI issue that Maxime mention is real but I don=E2=80=99t = think it=E2=80=99s a > big problem in practice.) FWIW I've some ideas for stable ABIs for record constructors even when fields are added/removed or change from direct/thunked/delayed, a stable ABI can be defined later. Greetings, Maxime. --=-RiM3BdA/Np6MSgdv+kP3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYpjSQhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oviAP9Bksiw+RbkmjysQVhKosOJUcaH QUa6R1u7yKMNzrIhDAEA97oad6Yy6hMi3pAwafRFEzO+XcwkiErV22I7xItUoAI= =JSDV -----END PGP SIGNATURE----- --=-RiM3BdA/Np6MSgdv+kP3-- From unknown Sun Jun 15 01:08:59 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#55653] [PATCH] guix: Add syntactic sugar for profile generation. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 02 Jun 2022 16:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Andrew Tropin , 55653@debbugs.gnu.org, Maxime Devos , zimoun Received: via spool by 55653-submit@debbugs.gnu.org id=B55653.165418871027437 (code B ref 55653); Thu, 02 Jun 2022 16:52:02 +0000 Received: (at 55653) by debbugs.gnu.org; 2 Jun 2022 16:51:50 +0000 Received: from localhost ([127.0.0.1]:54512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwo33-00078T-NJ for submit@debbugs.gnu.org; Thu, 02 Jun 2022 12:51:49 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:41956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwo2z-00078D-AD for 55653@debbugs.gnu.org; Thu, 02 Jun 2022 12:51:48 -0400 Received: by mail-ed1-f68.google.com with SMTP id 25so6759380edw.8 for <55653@debbugs.gnu.org>; Thu, 02 Jun 2022 09:51:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=43q8kPflaZGWZc462T9ZBpoJfQ306LebxXny/qXsySU=; b=S9M7r2aOrtLmMfYsLzDnPl5sIqiol0f7IGv0s/zi59koNz+FT1yto/Xelf8XmZykO2 uNN8d2jH+58o9O2ll5T6zAOw9oyLVADKpJ9kmI13O2y1AH3p/ybqpiWZNVWpNSI1veKi RB7I4j2jLZ0pC0lN9H+AkC/jmHmakxUpG4/KPkg664SkOc+ogzUuxwMNor16twCM+1Kh cpIznLrtmX8KYt7xERcUP3h25Akt1WO/7+aSn5xqXouAcrq1QD4/nmcRZSn+lveDkbM5 U6w0MeVfScMoA6gUEY5/qYEGnaN8syUaA+/toh9u4tbIQJ9RPWKss2cYH71k05LRh5eB 8HRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=43q8kPflaZGWZc462T9ZBpoJfQ306LebxXny/qXsySU=; b=LgkCJz98mUI2vQ7d72zyMX4Ecq3VhldjNl604a6gb0f+ET+Nu/G8lam51hut+pnuKO 4mO41EMD/Xe27pISABVRidSLNiDdDN4gHy+10H3MHiQImxCtKbcmOuyAPbFjJxUgeehv coJnZE0Wi9DYfh/X5evJIsXKJdEHJa0gBC9yCHMad55FCDaVKS1C4fralLqPIPXpbnsa GLk6q+s+lL/LTk7s9flxA5vPUXWysuc1RF9cypRVtz80+1YEsiDBSjR6KeGJ8AAPgaok 3zIzoUeCPI5tN6x1bTQer7En/rbUtFjoCfj5bAwvd3f7cH3F6/6adlRMwL2HZGftaTRa R7xg== X-Gm-Message-State: AOAM530bd1vFhYy5FT62ba6/YnOuZxM1pP0xHVRStZV87xSRO/KvHCkY cCOwxn8JeqUfmwjeeJ9CZWo= X-Google-Smtp-Source: ABdhPJwb5QQmvGC2gX2UrnI0tpHUObuuP2jPIjkZYvhxLZkg/NLNx3ebiYKJtCTe9WxOJJqBFT5X1Q== X-Received: by 2002:a05:6402:289:b0:42d:cd82:be22 with SMTP id l9-20020a056402028900b0042dcd82be22mr6435864edv.373.1654188699403; Thu, 02 Jun 2022 09:51:39 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id l21-20020a17090615d500b006feb479fcb4sm1901592ejd.44.2022.06.02.09.51.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 09:51:39 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Thu, 02 Jun 2022 18:51:38 +0200 In-Reply-To: <87sfonp4vr.fsf@gnu.org> References: <10354f31e0be9bcb88b78da2fb8a2a3c3acbde10.camel@gmail.com> <87sfopyfte.fsf@gnu.org> <87zgiwtbid.fsf@gnu.org> <60b305664d635fa72c2162d0e55fe44af3c95461.camel@gmail.com> <87sfonp4vr.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Am Donnerstag, dem 02.06.2022 um 15:32 +0200 schrieb Ludovic Courtès: > Hallo! > > Liliana Marie Prikler skribis: > > > If it reads like that, then that's probably a mistake somewhere.  > > My actual proposal to allow both of the following: > > > > (package > >   other-fields ... > >   (manifest some-manifest)) > > (package > >   other-fields ... > >   (packages (list bash coreutils emacs ...))) > > Oh OK, I got it wrong, sorry. Actually, I too got it wrong in the patch description. The implementation and test should be fine though. > Still I’m not a fan of having syntax that looks like a field but is > not an actual field, if we can avoid it.  I prefer to expose the data > structure as it exists and, if needed, to build abstractions on top > of it. I can see where you're coming from, but IMHO the content field does not itself provide a useful abstraction, and changing the profile record + constructor would itself break ABI. Thus the syntactic sugar. > [...] > > My use case of naming profiles would be served by such a procedure, > > but using a syntactic constructor has other benefits in that all of > > the fields of the profile become accessible.  That means that users > > could (once profile management via Guix Home is implemented) for > > instance run less hooks or additional hooks for certain profiles, > > allow collisions, use relative symlinks, etc. for basically free, > > not to mention that changes which break record ABI (such as added > > fields) get promoted directly through syntax but not through a > > plain procedure. > > This is an argument (and probably a good one) in favor of using > records.  I don’t read it as an argument in favor of the > ‘packages’ pseudo field though? Indeed, my argument for the pseudo-field is mere readability. Compare the four semantically equivalent ways of writing a profile in the test case I added. Cheers