From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iOfyM1q8mGLM/wAAbAwnHQ (envelope-from ) for ; Thu, 02 Jun 2022 15:34:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cBbXM1q8mGLQ+QAAauVa8A (envelope-from ) for ; Thu, 02 Jun 2022 15:34:18 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7AA11CED7 for ; Thu, 2 Jun 2022 15:34:18 +0200 (CEST) Received: from localhost ([::1]:58564 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwkxt-0006h2-CZ for larch@yhetil.org; Thu, 02 Jun 2022 09:34:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkxf-0006fb-6n for guix-patches@gnu.org; Thu, 02 Jun 2022 09:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59252) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwkxe-0001UK-8t for guix-patches@gnu.org; Thu, 02 Jun 2022 09:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwkxe-0001FR-4z for guix-patches@gnu.org; Thu, 02 Jun 2022 09:34:02 -0400 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-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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654176858; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Cj+P7Mdr6kM6ZkBBispG1OQI2F9t40Lk+KoSG0c2yZo=; b=iyVpbrbmOFSkcw77W0gmG9yZJVqMhA6wUlahbvYkvq9knhf9oI0ZR34a8SBSK8xmqjbSoT 8/0i6t4j8EjgrnQxsUNNCGkx4QL7RpTFrlUHHpa/uAfolWg3PdP48f5QLYvDvoa5r3Rbe/ F3fp0vvHfSc6HmcrMycylQ8UyPoWyyEUzKEraaGxVsspvaiYlWRQhmij86N85ymZiSxPDo akYH2A05llfWdmktyyb63lD+x2iQXhZ8CPtj4P/owdk9iV/zMErnVRezRqZlbeebrfyHjt qMbpxLR0Zt46QrEAfBWoIDRqX2M5H4H7QeNo3fMkk8asA7onB8eiXQ4+7aHA3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654176858; a=rsa-sha256; cv=none; b=rnpt5GKqufcLW12R55NyfM2jTrPg4M/T+kuR1LMW8gzVIZv100ehczILbFGdzi5nsewjmf wk9OTZc4ChCm1fYJi12VSw79fx982ycecMQSTuit86PBTjJ2UQO1r65Q5o7O85410CStIi bIayQlD+Mx6O/cebhKF0/gA9e8MVBwXC+Ke0mPWW8OuBrCw4X2jmc/occQPeJKLWFk0U11 NcCrj11WSa6j2GEsAAUeEHWWoOpeHWK9xV2QNOIFtPIlKyAfZvRZwwMLM9RTyA52IPVffB gEZ/XkBHrVnCimVWfj8L+Gb8JhMH2f7GBwfYxmytT4zeyEbaeSXpDqKH28CoKA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=PavFnhMs; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.72 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=PavFnhMs; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7AA11CED7 X-Spam-Score: -2.72 X-Migadu-Scanner: scn0.migadu.com X-TUID: zu61/nA8t2DB 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.