From 16eb115ef4986f319e6aebb04cefce12bc851e01 Mon Sep 17 00:00:00 2001 From: nebuli Date: Sun, 30 Nov 2014 17:47:22 +0100 Subject: guix: scripts: Add GUIX_BUILD_OPTIONS environment handling. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * doc/guix.texi (Invoking guix build): Mention 'GUIX_BUILD_OPTIONS'. * guix/scripts/archive.scm: (append args (environment-build-options)). * guix/scripts/build.scm: Ditto. * guix/scripts/environment.scm: Ditto. * guix/scripts/package.scm: Ditto. * guix/scripts/system.scm: Ditto. * guix/ui.scm (environment-build-options): New function. * guix/utils.scm (arguments-from-environment-variable): New function. * tests/guix-build.sh: Add tests. * test-env.in: Unset GUIX_BUILD_OPTIONS. Co-authored-by: Ludovic Courtès --- doc/guix.texi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc/guix.texi') diff --git a/doc/guix.texi b/doc/guix.texi index f313ba5db4..75ce632602 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -2781,6 +2781,24 @@ the @code{package-derivation} procedure of the @code{(guix packages)} module, and to the @code{build-derivations} procedure of the @code{(guix store)} module. +In addition to options explicitly passed on the command line, +@command{guix build} and other @command{guix} commands that support +building honor the @code{GUIX_BUILD_OPTIONS} environment variable. + +@defvr {Environment Variable} GUIX_BUILD_OPTIONS +Users can define this variable to a list of command line options that +will automatically be used by @command{guix build} and other +@command{guix} commands that can perform builds, as in the example +below: + +@example +$ export GUIX_BUILD_OPTIONS="--no-substitutes -c 2 -L /foo/bar" +@end example + +These options are appended to the ones passed on the command line. +@end defvr + + @node Invoking guix download @section Invoking @command{guix download} -- cgit v1.2.3