Hello all,
I'd like to float an idea for an improvement to what's possible with package
transformations. This seems like it would be a good beginner contribution for
me (or anyone who might want to tackle it sooner!), but before I go ahead, I
want to invite feedback on my idea.
Background
==========
I'm a Debian Developer getting started with Guix, so I figured I had better
orient myself by looking at the packages I'm already maintaining in Debian. In
my case, I wanted to get started by updating OpenCASCADE, a FreeCAD
dependency.
Besides updating the version, I also noticed the Guix package is not using the
optional RapidJSON dependency to enable glTF export. Changing this is a matter
of including that package as a dependency and adding a CMake flag.
Since this was my first time working with Guix packaging, I tried testing this
setup using only package transformations. However, quoting `guix package --
help-transform`:
```
--with-input=PACKAGE=REPLACEMENT
replace dependency PACKAGE by REPLACEMENT
...
--with-configure-flag=PACKAGE=FLAG
append FLAG to the configure flags of PACKAGE
```
So, it's possible to inject a configure flag, but not to inject a package, only
to replace one.
Proposal
=======
I would like to amend the `--with-input` syntax to allow for both addition and
removal, for example in the case of testing optional behavior or seeing if a
dependency can be removed (imagine a `foo-minimal` variant.) I don't have any
particular preference for the syntax.
For the sake of symmetry, I also wonder if it would make any sense to allow
for removal of a configuration flag. Depending on the build system, it may be
that appending e.g. `foo=off` will supersede an earlier `foo=on`, which would
mean the existing `--with-configure-flag` behavior is enough. I don't plan to
work on this change, but thought I should just mention it.
Anyway, thanks in advance for your feedback!
Cheers,
Kurt