all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Parameterized packages
@ 2019-05-14 11:54 Ludovic Courtès
  2019-05-14 15:17 ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 57+ messages in thread
From: Ludovic Courtès @ 2019-05-14 11:54 UTC (permalink / raw)
  To: Guix-devel

Hello Guix!

While thinking about <https://issues.guix.info/issue/35671> and looking
for ways to allow users to install just the locales they need right from
‘guix package’, I realized that “parameterized packages” are a
low-hanging fruit (by “parameterized packages” I mean something kinda
like Gentoo USE flags, or like a procedure if you will, but with a
command-line interface.)

Namely, one could write:

  (package
    (name "glibc-utf8-locales")
    ;; …
    (arguments
      `(#:phases … ,(assoc-ref (package-properties this-package)
                               'locales)
        …)))


and then we’d have a package transformation option like, say,
‘--with-argument=glibc-utf8-locales:locales=zh_CN.utf8’, which would
add the right property, like so:

  (package
    (inherit glibc-utf8-locales)
    (properties `((locales . ("zh_CN.utf8")))))

and tadaam! we have a parameterized package.

There’s a couple of gotchas:

  • We’d need to store more info in manifest entries so that
    transformation options are preserved upon ‘guix upgrade’.

  • We might need to expose the package parameters somehow, so that if
    one types ‘--with-argument=foobar=baz’, they get a correct error
    message saying that “foobar” is not a known parameter.

  • We might want to make the CLI option less verbose too, but how?

Thoughts, comrades?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2020-01-27 12:35 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-14 11:54 Parameterized packages Ludovic Courtès
2019-05-14 15:17 ` Tobias Geerinckx-Rice
2019-05-17 14:23   ` Pierre Neidhardt
2019-05-17 18:15   ` Mark H Weaver
2019-07-19  5:41     ` Chris Marusich
2019-07-19 20:29     ` ison
2020-01-02 19:23       ` Pierre Neidhardt
2020-01-09 11:10         ` Pierre Neidhardt
2020-01-09 23:13           ` Marius Bakke
2020-01-10 12:29             ` Pierre Neidhardt
2020-01-10 16:19         ` Ludovic Courtès
2020-01-11 11:31           ` Pierre Neidhardt
2020-01-14 15:05             ` zimoun
2020-01-15  9:40               ` Pierre Neidhardt
2020-01-15 11:30                 ` zimoun
2020-01-15 11:51                   ` Pierre Neidhardt
2020-01-15 13:54                     ` zimoun
2020-01-16 19:06                       ` ison
2020-01-16 20:55                         ` Ricardo Wurmus
2020-01-17 16:34                           ` Pierre Neidhardt
2020-01-17  9:15                         ` L p R n d n
2020-01-17 16:46                           ` Pierre Neidhardt
2020-01-17 15:53                         ` zimoun
2020-01-17 16:56                           ` Pierre Neidhardt
2020-01-20 14:34                             ` zimoun
2020-01-21 10:56                             ` Build systems and implicit inputs Ludovic Courtès
2020-01-21 12:24                               ` zimoun
2020-01-21 13:07                                 ` Pierre Neidhardt
2020-01-21 18:02                                   ` zimoun
2020-01-19 20:34                           ` Parameterized packages Ludovic Courtès
2020-01-20  9:08                             ` Pierre Neidhardt
2020-01-20 14:50                               ` zimoun
2020-01-20 18:57                                 ` Pierre Neidhardt
2020-01-20 19:07                                   ` Pierre Neidhardt
2020-01-20 22:57                                   ` ison
2020-01-21 10:09                                     ` Pierre Neidhardt
2020-01-21 10:49                                     ` Ludovic Courtès
2020-01-21 12:15                                   ` zimoun
2020-01-21 13:13                                     ` Pierre Neidhardt
2020-01-21 19:04                                       ` zimoun
2020-01-22  9:54                                         ` Pierre Neidhardt
2020-01-22 12:23                                           ` zimoun
2020-01-24 21:56                                             ` ison
2020-01-26 19:35                                               ` zimoun
2020-01-27 10:13                                                 ` Pierre Neidhardt
2020-01-27 11:23                                                   ` zimoun
2020-01-27 11:50                                                     ` Pierre Neidhardt
2020-01-27 12:34                                                       ` zimoun
2020-01-27 10:04                                               ` Pierre Neidhardt
2020-01-25 18:52                                             ` John Soo
2020-01-27 10:17                                               ` Pierre Neidhardt
2020-01-20 14:12                             ` zimoun
2020-01-17 16:31                         ` Pierre Neidhardt
     [not found]                         ` <875zhbvzfz.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me>
2020-01-17 16:41                           ` Pierre Neidhardt
2020-01-19 20:30                           ` Ludovic Courtès
2020-01-15 11:43                 ` Pierre Neidhardt
2020-01-15 11:44           ` Pierre Neidhardt

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.