From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Parameterized packages Date: Tue, 21 Jan 2020 14:13:49 +0100 Message-ID: <87lfq1q7ea.fsf@ambrevar.xyz> 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> <87d0bfrxr1.fsf@gnu.org> <87tv4qjy06.fsf@ambrevar.xyz> <875zh6rm5h.fsf@ambrevar.xyz> 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]:58531) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ittLy-0006N7-6y for guix-devel@gnu.org; Tue, 21 Jan 2020 08:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ittLu-00042p-2Y for guix-devel@gnu.org; Tue, 21 Jan 2020 08:13:58 -0500 In-Reply-To: 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: zimoun Cc: Guix Devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable zimoun writes: >> > --8<---------------cut here---------------start------------->8--- >> > (define (make-me-a-package option1 option2) >> > (package >> > =E2=80=A6)) >> > --8<---------------cut here---------------end--------------->8--- >> >> The ellipsis is a bit vague here. What is this trying to do? > > What you wrote below. :-) ? > And my opinion is that you described is already possible (more or > less) using 'inherit'. Except the modification of the compiling > options (build-system). The crucial difference is the current approach with inherit /does not compose/. This is where USE flags stand strong because you can tell what happens when both flags X and Y are set, e.g. =2D-8<---------------cut here---------------start------------->8--- (if (and X Y) ; Do something when we have both X and Y activated. ; Else maybe just X, or just Y, or none. ) =2D-8<---------------cut here---------------end--------------->8--- >> The point of declaring the parameters in advance is that it allows the >> user to list all parameters used by a given package. > > I bet that the number of broken packages will increase. Probably. But if we keep the same standard for the default values of the parameters, we would keep the same level of quality. It should be OK. >> - To let the user choose which video player to use. This is a popular >> USE flag on Gentoo (maybe with a different name). > > What I do not understand is: people who used Gentoo and especially USE > flag are saying that it ends with a big mess with broken packages. > Therefore, why does Guix want to reproduce the mess? Because it is extremely powerful: in a simple declaration like "no-X + pulseaudio + python3 + gtk2" you can build /your entire system/, according to the flags you've set, in just one command. Cheers! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4m+Q0ACgkQm9z0l6S7 zH8ymAgArGY0YNK063UO+taaDOvb0qv7mUpK8n6gsOLjwghop8rVTfflpoowsHJj Xu/3JCelatlKuT+RSZk/YAwsJDhhFSi+qbnmUOEOeGtynNEzYtSksBYPQ5F8rxuh WTz2y0n5fnFTp3jcQ3vjcr8EH8tABF2I6netL5iKycCsj0OL51QIqrrC6V+a5dQ3 ddht4KzeZIjLA6bx4mRIH+eptMtBwfUvIMxUDaEkXLgvAea768KokrHvyw7ybQR6 nUJZn4Z0DWwoDLy3It38YGYYrVfAaboSo99r/dkEn4gcBLcvCvz6FjpP09F3ZwFL JO64WxEmb4HfVY3OKumJMfbMKKan8w== =aWWe -----END PGP SIGNATURE----- --=-=-=--