diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-06-14 22:37:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-06-14 22:55:59 +0200 |
commit | 56b821069722c6341e9079299d90ae1cdfe9a916 (patch) | |
tree | 31207af9b6ec534010dd03b89f661b93eb936b3a /guix/scripts/build.scm | |
parent | a83c6a6471b0f1950ab5c53acb278e1b88d51c11 (diff) | |
download | gnu-guix-56b821069722c6341e9079299d90ae1cdfe9a916.tar gnu-guix-56b821069722c6341e9079299d90ae1cdfe9a916.tar.gz |
guix build: Allow gexps to be passed to '-e'.
* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
guxi build: Allow gexps to be passed to '-e'.
* guix/ui.scm (%guix-user-module): New variable.
(read/eval): Pass it as the second argument to 'eval'.
* guix/scripts/build.scm (options/resolve-packages): Add case for
'gexp?'.
* tests/guix-build.sh: Add tests.
* doc/guix.texi (Invoking guix build): Document '-e gexp'.
Diffstat (limited to 'guix/scripts/build.scm')
-rw-r--r-- | guix/scripts/build.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm index 6d864bfe3b..5e4647de79 100644 --- a/guix/scripts/build.scm +++ b/guix/scripts/build.scm @@ -24,6 +24,7 @@ #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix monads) + #:use-module (guix gexp) #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (ice-9 vlist) @@ -338,6 +339,11 @@ packages." `(argument . ,p)) ((? procedure? proc) (let ((drv (run-with-store store (proc) #:system system))) + `(argument . ,drv))) + ((? gexp? gexp) + (let ((drv (run-with-store store + (gexp->derivation "gexp" gexp + #:system system)))) `(argument . ,drv))))) (opt opt)) opts)) |