[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parameterized packages

From: Marius Bakke
Subject: Re: Parameterized packages
Date: Fri, 10 Jan 2020 00:13:47 +0100
User-agent: Notmuch/0.29.3 ( Emacs/26.3 (x86_64-pc-linux-gnu)

Pierre Neidhardt <address@hidden> 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.

   '((pulseaudio . #t)))
   `(#:configure-flags ,(match parameters
                         ((('pulseaudio . #t)
                          '("--enable-pulseaudio" "--enable-dbus"))
                         (_ '()))))
   `(("foo" ,foo)
     ,@(match parameters
         ((('pulseaudio . #t)
           `(("pulseaudio" ,pulseaudio))))
         (_ '()))))))

And perhaps a "with-parameters" procedure for toggling it:

  `(("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 :-)

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]