[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parameterized packages
From: |
Pierre Neidhardt |
Subject: |
Re: Parameterized packages |
Date: |
Fri, 17 Jan 2020 17:41:15 +0100 |
Hi Nicolò,
Yes, you are exactly right.
I didn't know Nix had it, that's great to hear!
Would you happen to know where those USE flags are implemented?
> Taking handbrake[1] recipe as an example: there's the useGtk flag that
> can be passed to the package definition, and that affects build
> options. Since in guix dependencies build inputs are specified inside
> the package definition, propagating those flags should be easy. If we
> standardize on flags names (don't have "-X", "noX", "disable-x"...), it
> should be easy to incrementally add flags support to all package
> dependencies. I imagine (with an invalid syntax probably) something
> like:
>
> (inputs
> `(,(unless (member build-flags 'no-x) ("libx11" libx11))
> ; this package always need x, don't pass flags
> ("input" ,input "out" (filter (lambda (x) (not (eq? x 'no-x))) build-flags))
> ("other-input" ,input))) ; flags are passed implicitly here?
Some questions arise though:
- What about passing parameters to implicit dependencies, e.g. those of
the build system?
- Consider the following case: With package A depending on B depending
on C, to get parameter X on A we need to enable X on C.
I guess the workaround is to include "C with parameter X" as an
explicit input of A. Hmm...
--
Pierre Neidhardt
https://ambrevar.xyz/
signature.asc
Description: PGP signature
- Re: Parameterized packages, (continued)
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/11
- Re: Parameterized packages, zimoun, 2020/01/14
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/15
- Re: Parameterized packages, zimoun, 2020/01/15
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/15
- Re: Parameterized packages, zimoun, 2020/01/15
- Re: Parameterized packages, ison, 2020/01/16
- Re: Parameterized packages, Ricardo Wurmus, 2020/01/16
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/17
- Re: Parameterized packages, Nicolò Balzarotti, 2020/01/16
- Re: Parameterized packages,
Pierre Neidhardt <=
- Re: Parameterized packages, Ludovic Courtès, 2020/01/19
- Re: Parameterized packages, L p R n d n, 2020/01/17
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/17
- Re: Parameterized packages, zimoun, 2020/01/17
- Re: Parameterized packages, Pierre Neidhardt, 2020/01/17
- Re: Parameterized packages, zimoun, 2020/01/20
- Build systems and implicit inputs, Ludovic Courtès, 2020/01/21
- Re: Build systems and implicit inputs, zimoun, 2020/01/21
- Re: Build systems and implicit inputs, Pierre Neidhardt, 2020/01/21
- Re: Build systems and implicit inputs, zimoun, 2020/01/21