summaryrefslogtreecommitdiff
path: root/tests/guix-build.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-18 23:08:20 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-18 23:08:20 +0100
commitac5de156ae5de8cb61870469863fb862b6a1205e (patch)
treeb1c13b61c7d3a66e1879f4b3eca28ae8f471e970 /tests/guix-build.sh
parente900c5031f4ecf5ac3f131a908a2616871793f8c (diff)
downloadpatches-ac5de156ae5de8cb61870469863fb862b6a1205e.tar
patches-ac5de156ae5de8cb61870469863fb862b6a1205e.tar.gz
guix build: '-e' can be passed a monadic thunk.
* guix/ui.scm (read/eval): New procedure. (read/eval-package-expression): Use it. * guix/scripts/build.scm (derivations-from-package-expressions): Rename to... (derivation-from-expression): ... this. Accept procedures, under the assumption that they are monadic thunk. (show-help): Adjust accordingly. (guix-build): Ditto. * tests/guix-build.sh: Add test. * doc/guix.texi (Invoking guix build): Augment description of '-e'.
Diffstat (limited to 'tests/guix-build.sh')
-rw-r--r--tests/guix-build.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh
index e228b38616..391e7b9da3 100644
--- a/tests/guix-build.sh
+++ b/tests/guix-build.sh
@@ -72,3 +72,11 @@ if guix build -n time-3.2; # FAIL, version not found
then false; else true; fi
if guix build -n something-that-will-never-exist; # FAIL
then false; else true; fi
+
+# Invoking a monadic procedure.
+guix build -e "(begin
+ (use-modules (guix monads) (guix utils))
+ (lambda ()
+ (derivation-expression \"test\" (%current-system)
+ '(mkdir %output) '())))" \
+ --dry-run