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 | |
| parent | 5c7bdc9a7fb2ed4f963dbacc7c1bee8cc9223303 (diff) | |
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')
| -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 a72ce0911de..f7fb3c5b64a 100644 --- a/tests/guix-build.sh +++ b/tests/guix-build.sh | |||
| @@ -167,6 +167,33 @@ guix build -e "(begin | |||
| 167 | guix build -e '#~(mkdir #$output)' -d | 167 | guix build -e '#~(mkdir #$output)' -d |
| 168 | guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv' | 168 | guix build -e '#~(mkdir #$output)' -d | grep 'gexp\.drv' |
| 169 | 169 | ||
| 170 | # Building from a package file. | ||
| 171 | cat > "$module_dir/package.scm"<<EOF | ||
| 172 | (use-modules (gnu)) | ||
| 173 | (use-package-modules bootstrap) | ||
| 174 | |||
| 175 | %bootstrap-guile | ||
| 176 | EOF | ||
| 177 | guix build --file="$module_dir/package.scm" | ||
| 178 | |||
| 179 | # Building from a monadic procedure file. | ||
| 180 | cat > "$module_dir/proc.scm"<<EOF | ||
| 181 | (use-modules (guix gexp)) | ||
| 182 | (lambda () | ||
| 183 | (gexp->derivation "test" | ||
| 184 | (gexp (mkdir (ungexp output))))) | ||
| 185 | EOF | ||
| 186 | guix build --file="$module_dir/proc.scm" --dry-run | ||
| 187 | |||
| 188 | # Building from a gexp file. | ||
| 189 | cat > "$module_dir/gexp.scm"<<EOF | ||
| 190 | (use-modules (guix gexp)) | ||
| 191 | |||
| 192 | (gexp (mkdir (ungexp output))) | ||
| 193 | EOF | ||
| 194 | guix build --file="$module_dir/gexp.scm" -d | ||
| 195 | guix build --file="$module_dir/gexp.scm" -d | grep 'gexp\.drv' | ||
| 196 | |||
| 170 | # Using 'GUIX_BUILD_OPTIONS'. | 197 | # Using 'GUIX_BUILD_OPTIONS'. |
| 171 | GUIX_BUILD_OPTIONS="--dry-run" | 198 | GUIX_BUILD_OPTIONS="--dry-run" |
| 172 | export GUIX_BUILD_OPTIONS | 199 | export GUIX_BUILD_OPTIONS |
