diff options
author | Ludovic Courtès <ludo@gnu.org> | 2024-12-14 23:07:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-12-18 18:32:41 +0100 |
commit | 5316e84e1b52cb96bf580552e654fe5b56720c47 (patch) | |
tree | 23579a90e69d3fcb5f3d48b312d5146ffc82d060 /doc | |
parent | 2767b4ef031d8efe5c8718f21690b073fb43adda (diff) |
packages: Add #:recursive? to ‘package-input-rewriting’.
* guix/packages.scm (package-input-rewriting): Add #:recursive?
[cut?]: Honor it.
* tests/packages.scm ("package-input-rewriting, recursive"): New test.
* doc/guix.texi (Defining Package Variants): Document it.
Change-Id: Ie82f35ae0ae873dc68f8b1c0dd6616f552772e65
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index ee2002a712..f7b7569887 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8665,13 +8665,17 @@ Dependency graph rewriting, for the purposes of swapping packages in the graph, is what the @code{package-input-rewriting} procedure in @code{(guix packages)} implements. -@deffn {Procedure} package-input-rewriting replacements [rewrite-name] [#:deep? #t] +@deffn {Procedure} package-input-rewriting replacements [rewrite-name] @ + [#:deep? #t] [#:recursive? #f] Return a procedure that, when passed a package, replaces its direct and indirect dependencies, including implicit inputs when @var{deep?} is true, according to @var{replacements}. @var{replacements} is a list of package pairs; the first element of each pair is the package to replace, and the second one is the replacement. +When @var{recursive?} is true, apply replacements to the right-hand sides of +@var{replacements} as well, recursively. + Optionally, @var{rewrite-name} is a one-argument procedure that takes the name of a package and returns its new name after rewrite. @end deffn |