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 --- tests/guix-build.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/guix-build.sh b/tests/guix-build.sh index 27b3fdc39e..836c45e776 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -84,3 +84,13 @@ guix build -e "(begin # Running a gexp. guix build -e '#~(mkdir #$output)' -d guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv' + +# Using 'GUIX_BUILD_OPTIONS'. +GUIX_BUILD_OPTIONS="--dry-run" +export GUIX_BUILD_OPTIONS + +guix build emacs + +GUIX_BUILD_OPTIONS="--something-completely-crazy" +if guix build emacs; +then false; else true; fi -- cgit v1.2.3