guix/doc
Ludovic Courtès 2bf6f962b9
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.
2020-09-27 21:41:08 +02:00
..
images doc: Update 'Bootstrapping' for further binary seed reduction. 2020-05-22 16:11:52 +02:00
build.scm doc: Syntax highlighting now handles @var within @lisp. 2020-09-04 11:29:51 +02:00
contributing.texi doc: Fix broken hyperlinks in the contribution instructions. 2020-09-18 14:33:17 -04:00
environment-gdb.scm
fdl-1.3.texi doc: Use HTTPS for external links. 2020-03-10 20:26:52 +01:00
guix-cookbook.texi doc: cookbook: Adding a section "Running Guix on a Linode Server" 2020-09-09 09:28:12 +02:00
guix.texi packages: 'package-input-rewriting/spec' can rewrite implicit dependencies. 2020-09-27 21:41:08 +02:00
htmlxref.cnf
local.mk doc: Update 'Bootstrapping' for further binary seed reduction. 2020-05-22 16:11:52 +02:00
package-hello.json doc: Document building and installing from JSON files. 2020-04-16 23:41:52 +02:00
package-hello.scm