[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Discussion on Parameterized Packages
From: |
Simon Tournier |
Subject: |
Re: Discussion on Parameterized Packages |
Date: |
Mon, 15 May 2023 13:49:32 +0200 |
Hi,
On jeu., 11 mai 2023 at 20:38, Sarthak Shah <shahsarthakw@gmail.com> wrote:
> https://blog.lispy.tech/2023/05/parameterized-packages.html
>
> I would really appreciate feedback on
> (1) parameters you'd like to see in Guix
> (2) the user interface for searching/installing/packaging with
> parameters
Just a quick remark. You are proposing something like:
--8<---------------cut here---------------start------------->8---
1 (define-public emacs
2 (package
3 (parameters (and
4 (optional jit^ png^ alsa^)
5 (one-of motif gtk^ x11!*)))
6 (parameter-transforms
7 ((x11!)
8 (changes-to-be-made-to-the-package)))))
--8<---------------cut here---------------end--------------->8---
or other variants. Well, I am a bit afraid by the maintenance of such
packages. The combinatorial complexity will be exploding and it will be
harder to update such packages, IMHO.
Instead, I would go with something similar as ’package/inherit’. For
instance, something like that:
--8<---------------cut here---------------start------------->8---
(define-public emacs-params
(package/parametrized emacs
(parameters (and
(optional jit^ png^ alsa^)
(one-of motif gtk^ x11!*)))
(parameter-transforms
((x11!)
(changes-to-be-made-to-the-package)))))
--8<---------------cut here---------------end--------------->8---
Well, from my point of view, these parametrized packages could go to
specific modules (or channels). And keeping them separate would avoid
nightmares about maintenance – it is already enough complex without
parameters. :-)
Cheers,
simon