From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Parameterized packages Date: Thu, 18 Jul 2019 22:41:55 -0700 Message-ID: <877e8e8tss.fsf@gmail.com> References: <87woitz1xx.fsf@gnu.org> <87o945vze5.fsf@nckx> <8736ldq74z.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33529) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoLed-0000SX-Ua for guix-devel@gnu.org; Fri, 19 Jul 2019 01:42:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoLec-0000nM-Mc for guix-devel@gnu.org; Fri, 19 Jul 2019 01:42:03 -0400 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:45283) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoLec-0000mK-GC for guix-devel@gnu.org; Fri, 19 Jul 2019 01:42:02 -0400 Received: by mail-pl1-x636.google.com with SMTP id y8so15054517plr.12 for ; Thu, 18 Jul 2019 22:42:02 -0700 (PDT) In-Reply-To: <8736ldq74z.fsf@netris.org> (Mark H. Weaver's message of "Fri, 17 May 2019 14:15:29 -0400") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Mark H Weaver Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark H Weaver writes: >> Ludovic Court=C3=A8s wrote: >>> While thinking about and >>> looking >>> for ways to allow users to install just the locales they need right >>> from >>> =E2=80=98guix package=E2=80=99, I realized that =E2=80=9Cparameterized = packages=E2=80=9D are a >>> low-hanging fruit >> >> Wow. Unexpected turn=E2=80=A6 >> >> I'm still thinking about this, so all this is just me doing it out >> loud: >> >>> (package >>> (inherit glibc-utf8-locales) >>> (properties `((locales . ("zh_CN.utf8"))))) >>> >>> and tadaam! we have a parameterized package. >>> >>> There=E2=80=99s a couple of gotchas: >>> >>> =E2=80=A2 We=E2=80=99d need to store more info in manifest entries so= that >>> transformation options are preserved upon =E2=80=98guix upgrade=E2= =80=99. >>> >>> =E2=80=A2 We might need to expose the package parameters somehow, so >>> that if >>> one types =E2=80=98--with-argument=3Dfoobar.z=E2=80=99, they get a = correct >>> error >>> message saying that =E2=80=9Cfoobar=E2=80=9D is not a known paramet= er. >> >> Interesting idea to piggy-back on the properties field, and it might >> save some code (at least initially), but I don't see the overlap here. >> >> None of the current properties (superseded, upstream-name, *-variant, >> cpe-name, hidden?) make much sense to expose in this way; they're >> semimmutable facts about the package. > > Also, at present, the current 'properties' field can be changed without > changing the derivation, and I think that's quite useful. It's nice to > be able to do things like increase the build timeouts on a core package, > for the sake of a slow architecture, without forcing rebuilds of > everything on top of that package on other architectures. > > So, I would prefer to see a different package field used for this. I agree with Mark; using a custom package field seems better here because the arguments change the derivation (don't they?), but properties do not. Maybe "argument-overrides"? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl0xWCMACgkQ3UCaFdgi Rp2JaxAAqHSivJgoUlJsr7vqH6rMxrjH1krrkT3HvIhBVWpXhWltwCmx4Q63J2NA rbFIfmCkT4d9x1C33SDVNZ+8GQ0780Im1DtsVCuCUiHQYuX4XzNT6rY979Z8VF+M ICuQ8Xo4V+h7Sno/lJMUqSnA2GEWx8ZdJblTYmxtd2QFbv2kfVoZA9tEMxyLRhuy XrgftbokNm23fd+voK/z1Kr/vzniDbwsaXDQNmwutW/L7RUEG3IlBZHcATzre8Ek M/A3Xof1jbQxGz116XVaZsgvvfEXKJcj7P6DJsa1BM2L/9B8GlCGQVcw3uo4LeXs NCRQzMtvp/fhaFSLFdlCFsOlCb1OWRwUwdBmedxmQ12JXWY+zcpehziIh6LA2CoV pnhXbJF09TTPnXsctUaarmYx4G9CilQHDs7KPuKYAT8ZFadbJCYq6NDn9DLxG5wl 8yPPNwHqvv9b9jdk7kdKxbyRSrxg7xJf4oIeN1HXc/ixQme2TKZykvyYJkWCXjbk cwEJiUEfkVGCUb27HaCYLXwIEIVLgf+lKIGWELn7O5RfbWrdvALEdiUKaY+zsQlJ Bpf1qVf1xkReWN8HYKkN1mfuhcUCqD/dKFu0NqvNyqZAdW7BZFQaxpyEBNl7EWZW PWyqQEBdskHm7iZLHNtLTEevlLKgZ/Q5Y2XICIeWFCz/dXCEm5k= =AUU/ -----END PGP SIGNATURE----- --=-=-=--