diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-10-17 23:40:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-10-17 23:59:02 +0200 |
commit | 645b9df858683dc05ffa04c9eb2fdc45ccef4a65 (patch) | |
tree | 540031b1a9373e8492dfed0ce016514b45a3ea17 /doc/guix.texi | |
parent | 31c2fd1e01d5f95cd1fb873c44f5fa4ac1164e69 (diff) | |
download | gnu-guix-645b9df858683dc05ffa04c9eb2fdc45ccef4a65.tar gnu-guix-645b9df858683dc05ffa04c9eb2fdc45ccef4a65.tar.gz |
guix build: Add '--with-graft'.
* guix/scripts/build.scm (transform-package-inputs/graft): New procedure.
(%transformations): Add 'with-graft'.
(%transformation-options): Likewise.
(show-transformation-options-help): Document it.
* tests/scripts-build.scm ("options->transformation, with-graft"): New
test.
* doc/guix.texi (Package Transformation Options): Document it.
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 47fc199c6c..0c5d641b48 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4513,6 +4513,30 @@ This is a recursive, deep replacement. So in this example, both This is implemented using the @code{package-input-rewriting} Scheme procedure (@pxref{Defining Packages, @code{package-input-rewriting}}). + +@item --with-graft=@var{package}=@var{replacement} +This is similar to @code{--with-input} but with an important difference: +instead of rebuilding all the dependency chain, @var{replacement} is +built and then @dfn{grafted} onto the binaries that were initially +referring to @var{package}. @xref{Security Updates}, for more +information on grafts. + +For example, the command below grafts version 3.5.4 of GnuTLS onto Wget +and all its dependencies, replacing references to the version of GnuTLS +they currently refer to: + +@example +guix build --with-graft=gnutls=gnutls@@3.5.4 wget +@end example + +This has the advantage of being much faster than rebuilding everything. +But there is a caveat: it works if and only if @var{package} and +@var{replacement} are strictly compatible---for example, if they provide +a library, the application binary interface (ABI) of those libraries +must be compatible. If @var{replacement} is somehow incompatible with +@var{package}, then the resulting package may be unusable. Use with +care! + @end table @node Additional Build Options |