From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: Parameterized packages Date: Fri, 17 May 2019 14:15:29 -0400 Message-ID: <8736ldq74z.fsf@netris.org> References: <87woitz1xx.fsf@gnu.org> <87o945vze5.fsf@nckx> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRhYD-0006iS-UG for guix-devel@gnu.org; Fri, 17 May 2019 14:25:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRhQH-0000uw-6y for guix-devel@gnu.org; Fri, 17 May 2019 14:17:39 -0400 In-Reply-To: <87o945vze5.fsf@nckx> (Tobias Geerinckx-Rice's message of "Tue, 14 May 2019 17:17:38 +0200") 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: Tobias Geerinckx-Rice Cc: guix-devel@gnu.org Hi, Tobias Geerinckx-Rice 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 p= ackages=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=3Dbaz=E2=80=99, they get= a correct >> error >> message saying that =E2=80=9Cfoobar=E2=80=9D is not a known paramete= r. > > 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. Thanks, Mark