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/