summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authornebuli <nebu@kipple>2014-11-30 17:47:22 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-30 18:54:07 +0100
commit16eb115ef4986f319e6aebb04cefce12bc851e01 (patch)
treed3f456766d9b90dd8f7e555a576457937e044918 /guix/ui.scm
parent6efc160efe6b91dd2ef2b74d551411d290c3b1f6 (diff)
guix: scripts: Add GUIX_BUILD_OPTIONS environment handling.
* 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 <ludo@gnu.org>
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 69b073da50..c77e04172e 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -64,6 +64,7 @@
string->generations
string->duration
args-fold*
+ environment-build-options
run-guix-command
program-name
guix-warning-port
@@ -712,6 +713,10 @@ reporting."
(leave (_ "invalid argument: ~a~%")
(apply format #f msg args)))))
+(define (environment-build-options)
+ "Return additional build options passed as environment variables."
+ (arguments-from-environment-variable "GUIX_BUILD_OPTIONS"))
+
(define (show-guix-usage)
(format (current-error-port)
(_ "Try `guix --help' for more information.~%"))