From: ison <ison@airmail.cc>
To: zimoun <zimon.toutoune@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Parameterized packages
Date: Thu, 16 Jan 2020 12:06:44 -0700 [thread overview]
Message-ID: <20200116190644.uytvzvypuvdwh2iq@n0> (raw)
In-Reply-To: <CAJ3okZ2bU4FDrU6rUXtcYWv+GUbTM76rpDXZSYnbRuNvZqZvnA@mail.gmail.com>
On Wed, Jan 15, 2020 at 02:54:25PM +0100, zimoun wrote:
> Everything is doable with Guix. ;-)
> However, it is not clear to me what is the best/easiest way to go.
> For example, here [2] I give a try.
>
> [2] https://lists.gnu.org/archive/html/help-guix/2020-01/msg00087.html
>
>
> And what I was thinking is a mechanism to easily set some arguments to
> the build-system; for example changing the compiler toolchain (say
> replacing GCC by Clang/LLVM).
>
> Well, as I said, I do not know if it is related to "parametrized
> packages" because I am not sure to understand the final aim for these
> "parametrized packages". :-)
Maybe the current discussion is trying too hard to emulate Gentoo's USE
flags and dependency graph concept (perhaps its my fault for bringing up
global flags). But that feels like introducing "side effects", and maybe the
whole idea should be treated more "functionally" in Guix.
That is, simplify the problem to the mere concept of passing arguments to
functions and nothing more. Take the headless server example: some parameter
is passed to a package such as
'("-X")
That package would then be entirely responsible for what to do with them. If
the package decides not to pass the same parameters to its inputs then the
inputs are simply built without any parameters.
This would have the benefit of not breaking any existing packages regardless
of what parameters are sent to them.
And packages can be modified by maintainers to accept parameters and pass
them on to their inputs as the need arises over time (e.g. packages typically
installed by headless servers can be modified to pass the "-X" flag on to
certain inputs).
Additionally if someone wanted to take the risk and _force_ all inputs to
use the same flags then they can use a function similar to
"package-input-rewriting" (there could be a "package-use-flags-rewriting"),
so it becomes similar to how other types of transformations are currently
handled in Guix.
Ideally packages can still be made to allow all flags to "trickle down" to
their dependencies without input-rewriting simply by passing all parameters
into their inputs in the package definition, but the difference here is that
we don't force it. That's something that can be approached over time, or
not. The idea is to just let packages do it if they want to, and let the
package maintainers filter the list of flags before passing on to inputs if
they need to, and the whole thing becomes more predictable and functional.
This also avoids the problem of which types of inputs to modify (normal
inputs, native-inputs, etc) because then it's just up to the package
maintainer.
next prev parent reply other threads:[~2020-01-16 19:06 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200116190644.uytvzvypuvdwh2iq@n0 \
--to=ison@airmail.cc \
--cc=guix-devel@gnu.org \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.