From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: Parameterized packages Date: Fri, 10 Jan 2020 00:13:47 +0100 Message-ID: <875zhk1avo.fsf@devup.no> References: <87woitz1xx.fsf@gnu.org> <87o945vze5.fsf@nckx> <8736ldq74z.fsf@netris.org> <20190719202906.lbanx5puk7t6q4cr@cf0> <87a7753boq.fsf@ambrevar.xyz> <877e20ansg.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:33599) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ipgzy-00018B-2s for guix-devel@gnu.org; Thu, 09 Jan 2020 18:13:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ipgzw-00026q-SB for guix-devel@gnu.org; Thu, 09 Jan 2020 18:13:53 -0500 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:56577) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ipgzw-0001ze-Br for guix-devel@gnu.org; Thu, 09 Jan 2020 18:13:52 -0500 In-Reply-To: <877e20ansg.fsf@ambrevar.xyz> 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: Pierre Neidhardt Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Pierre Neidhardt writes: > Any thought on this, anyone? Having used Gentoo for some years, I'm not sure a "global" parameter system is desirable. It could encourage enabling feature "foo", even for packages that have experimental or broken support for "foo". But I see how it could be useful to parameterize packages nevertheless. I imagine adding a 'parameters' field to the package type, and write definitions along these lines. (package (parameters '((pulseaudio . #t))) (arguments `(#:configure-flags ,(match parameters ((('pulseaudio . #t) '("--enable-pulseaudio" "--enable-dbus")) (_ '())))) (inputs `(("foo" ,foo) ,@(match parameters ((('pulseaudio . #t) `(("pulseaudio" ,pulseaudio)))) (_ '())))))) And perhaps a "with-parameters" procedure for toggling it: (inputs `(("foo" ,foo)) ("bar" ,(with-parameters ((pulseaudio . #f)) bar))) We could have a similar procedure that recursively toggles supported parameters of all given packages. Actually we can abuse the 'properties' field for this purpose without having to change anything. Well, food for thought, thanks for driving this :-) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl4Xs6sACgkQoqBt8qM6 VPqp0Qf/ctIRfJew/6OgHvQhRGIYk9IpF1YRYhTaL0m8w9WLcsuu54flVc6gm/f7 B3keoBSuXSae1SsA+NTTHUyeg0sas3XEWqUhe/KNNCc+ziUTFvs+XaFGXV4bkYPB 1eUJZ95dUI8G6D+xtPpVVuoxit7PPsQ2/bXqh2HkGRNXFLiZSutF3PehGauNTUZ5 98+Elz6iTsrIhHB+zi3Di3lvuKfvehbXLZs03IbyWLzTBh9T4bo8tXxEJSMfEnp9 wNGV+C2Ov2MXd7rSF5RzkAYIpl6I9mi8054xYoprjcYKFoqY9zSF2E3Wka55jg+y 8HKSgS+UNcP7yfiiFNutdVP/3eahUg== =5yag -----END PGP SIGNATURE----- --=-=-=--