diff options
author | David Thompson <dthompson2@worcester.edu> | 2015-10-26 18:09:28 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2015-10-28 08:40:16 -0400 |
commit | 34a1783fc1498d7150210da22dd7804d288438b3 (patch) | |
tree | 5d964a4eb2de50130a878cd93373f429e10cb26f /tests/guix-build.sh | |
parent | 5c7bdc9a7fb2ed4f963dbacc7c1bee8cc9223303 (diff) | |
download | guix-34a1783fc1498d7150210da22dd7804d288438b3.tar guix-34a1783fc1498d7150210da22dd7804d288438b3.tar.gz |
scripts: build: Add --file option.
* guix/scripts/build.scm (show-help): Add help text for --file option.
(%options): Add --file option.
(options/resolve-packages): Handle 'file' options.
* tests/guix-build.sh: Add tests.
* doc/guix.texi ("invoking guix build"): Add doc.
Diffstat (limited to 'tests/guix-build.sh')
-rw-r--r-- | tests/guix-build.sh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/guix-build.sh b/tests/guix-build.sh index a72ce0911d..f7fb3c5b64 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh @@ -167,6 +167,33 @@ guix build -e "(begin guix build -e '#~(mkdir #$output)' -d guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv' +# Building from a package file. +cat > "$module_dir/package.scm"<<EOF +(use-modules (gnu)) +(use-package-modules bootstrap) + +%bootstrap-guile +EOF +guix build --file="$module_dir/package.scm" + +# Building from a monadic procedure file. +cat > "$module_dir/proc.scm"<<EOF +(use-modules (guix gexp)) +(lambda () + (gexp->derivation "test" + (gexp (mkdir (ungexp output))))) +EOF +guix build --file="$module_dir/proc.scm" --dry-run + +# Building from a gexp file. +cat > "$module_dir/gexp.scm"<<EOF +(use-modules (guix gexp)) + +(gexp (mkdir (ungexp output))) +EOF +guix build --file="$module_dir/gexp.scm" -d +guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv' + # Using 'GUIX_BUILD_OPTIONS'. GUIX_BUILD_OPTIONS="--dry-run" export GUIX_BUILD_OPTIONS |