From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Parameterized packages Date: Thu, 16 Jan 2020 21:55:14 +0100 Message-ID: <87lfq7xgst.fsf@elephly.net> References: <8736ldq74z.fsf@netris.org> <20190719202906.lbanx5puk7t6q4cr@cf0> <87a7753boq.fsf@ambrevar.xyz> <87h813wah0.fsf@gnu.org> <87v9piut40.fsf@ambrevar.xyz> <87o8v5ukgb.fsf@ambrevar.xyz> <87d0blhr9s.fsf@ambrevar.xyz> <20200116190644.uytvzvypuvdwh2iq@n0> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:59968) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1isCAz-0003Gu-Jf for guix-devel@gnu.org; Thu, 16 Jan 2020 15:55:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1isCAv-00073J-NN for guix-devel@gnu.org; Thu, 16 Jan 2020 15:55:37 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21145) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1isCAu-00070j-Ha for guix-devel@gnu.org; Thu, 16 Jan 2020 15:55:33 -0500 In-reply-to: <20200116190644.uytvzvypuvdwh2iq@n0> 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-mx.org@gnu.org Sender: "Guix-devel" To: ison Cc: guix-devel@gnu.org ison writes: > Maybe the current discussion is trying too hard to emulate Gentoo's USE > flags and dependency graph concept (perhaps its my fault for bringing up > global flags). But that feels like introducing "side effects", and maybe = the > whole idea should be treated more "functionally" in Guix. > > That is, simplify the problem to the mere concept of passing arguments to > functions and nothing more. Take the headless server example: some parame= ter > is passed to a package such as > '("-X") > That package would then be entirely responsible for what to do with them.= If > the package decides not to pass the same parameters to its inputs then the > inputs are simply built without any parameters. I think this is a sensible approach, though it would require agreement or at least coordination among package contributors about what parameters to use. For example, one such parameter could be =E2=80=9C#:headless=E2=80=9D to disable any graphical user interface or des= ktop feature, but a case could just as well be made for =E2=80=9C#:gui=E2=80=9D or =E2=80= =9C#:graphical=E2=80=9D=E2=80=A6 Coordination hasn=E2=80=99t been a problem so far because we managed to agr= ee on build systems and utilities, but it seems to me that parameters to match on span a much larger range =E2=80=94 I feel reminded of the problem of pac= kage tags or categories, which are a similarly large field that defies agreement. -- Ricardo