diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-09-23 10:29:09 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-09-27 21:41:08 +0200 |
commit | 2bf6f962b91123b0474c0f7123cd17efe7f09a66 (patch) | |
tree | 21f74da9ad3b3eaacf91cd63302bea01f55bedb9 /gnu/packages | |
parent | ff39361c80dfc67a9afe35f315a774140d8cf99b (diff) |
packages: 'package-input-rewriting/spec' can rewrite implicit dependencies.
With this change, '--with-input', '--with-graft', etc. also apply to
implicit dependencies. Thus, it's now possible to do:
guix build python-itsdangerous --with-input=python-wrapper=python@2
or:
guix build hello --with-graft=glibc=glibc@2.29
Additionally, before, implicit inputs were not rewritten, which could
lead to duplicates in the output of 'bag-transitive-inputs' (packages
that are not 'eq?' but lead to the same derivation). This in turn would
lead to unnecessary rebuilds when using '--with-input' & co. This
change fixes it by ensuring even implicit inputs are rewritten.
Fixes <https://bugs.gnu.org/42156>.
* guix/packages.scm (package-input-rewriting/spec): Add #:deep?
defaulting to #true, and pass it to 'package-mapping'.
[replacement-property]: New variable.
[rewrite]: Check that property and set it on the result of PROC.
[cut?]: New procedure.
* tests/packages.scm ("package-input-rewriting/spec"): Ensure implicit
inputs were unchanged.
("package-input-rewriting/spec, partial match"): Pass #:deep? #f.
("package-input-rewriting/spec, deep")
("package-input-rewriting/spec, no duplicates"): New tests.
(package/inherit): Move before use.
* tests/guix-build.sh: Add tests.
* tests/scripts-build.scm ("options->transformation, with-graft"):
Compare dependencies by package name or derivation file name.
* doc/guix.texi (Defining Packages): Adjust accordingly.
Diffstat (limited to 'gnu/packages')
0 files changed, 0 insertions, 0 deletions