[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 14 May 2019 13:54:18 +0200
Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)
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
Namely, one could write:
`(#:phases … ,(assoc-ref (package-properties this-package)
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:
(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?
- Parameterized packages,
Ludovic Courtès <=