From a6334223719bf6b2695d2dc0e75dbfe69e901bd7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 24 Nov 2024 22:58:22 +0100 Subject: guix build: Add ‘--development’ option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/scripts/build.scm (show-help, %options): Add ‘-D’. (options->things-to-build): Change ‘append-map’ to a loop. Honor ‘-D’. * tests/guix-build.sh: Add test. * doc/guix.texi (Additional Build Options): Document it. Reviewed-by: Maxim Cournoyer Change-Id: I99227aadfe861e43c001a4872292bd687b37f5d4 --- doc/guix.texi | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 3eee1b87d5..f8eefa365b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13614,6 +13614,31 @@ Lastly, @var{expr} may refer to a zero-argument monadic procedure (@pxref{The Store Monad}). The procedure must return a derivation as a monadic value, which is then passed through @code{run-with-store}. +@item --development +@itemx -D +Build the ``development environment'' (build dependencies) of the +following package. + +For example, the following command builds the inputs of @code{hello}, +but @emph{not} @code{hello} itself, and also builds @code{guile}: + +@example +guix build -D hello guile +@end example + +Notice that @option{-D} (or @option{--development}) only applies to the +immediately following package on the command line. Under the hood, it +uses @code{package->development-manifest} +(@pxref{package-development-manifest, +@code{package->development-manifest}}). + +@quotation Note +The effect of combining @option{--development} with @option{--target} +(for cross-compilation) may not be what you expect: it will +cross-compile all the dependencies of the given package when it is built +natively. +@end quotation + @item --source @itemx -S Build the source derivations of the packages, rather than the packages -- cgit v1.2.3