summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-10-25 22:33:33 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-10-29 16:24:12 -0400
commitcc90fbbf39e310a166e356f7019036eb30d4808a (patch)
treecb60b1749a2fe13f7cbe0030488bec06292ff25b /tests
parent6726282b20918f98ba7197ea1301376f29a248af (diff)
downloadgnu-guix-cc90fbbf39e310a166e356f7019036eb30d4808a.tar
gnu-guix-cc90fbbf39e310a166e356f7019036eb30d4808a.tar.gz
scripts: environment: Allow mixing regular and ad-hoc packages.
This patch changes the --ad-hoc flag to be positional. That is, the packages that appear before --ad-hoc are interpreted as packages whose inputs should be in the environment; the packages that appear after are interpreted as packages to be directly added to the environment. * guix/scripts/environment.scm (tag-package-arg, compact): New procedures. (%options): Tweak the handlers for --load and --expression options. (options/resolve-packages): Preserve package mode tag. (parse-args): Tweak argument handler to use package tagging procedure. (guix-environment): Apply ad-hoc behavior on a per package basis. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Document new behavior of --ad-hoc.
Diffstat (limited to 'tests')
-rw-r--r--tests/guix-environment.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh
index f91c78a801..49b3b1ccc3 100644
--- a/tests/guix-environment.sh
+++ b/tests/guix-environment.sh
@@ -97,4 +97,18 @@ then
# Make sure the "debug" output is not listed.
if grep -E "$make_boot0_debug" "$tmpdir/a"; then false; else true; fi
+
+ # Compute the build environment for the initial GNU Make, but add in the
+ # bootstrap Guile as an ad-hoc addition.
+ guix environment -e '(@@ (gnu packages commencement) gnu-make-boot0)' \
+ --ad-hoc guile-bootstrap --no-substitutes --search-paths \
+ --pure > "$tmpdir/a"
+
+ # Make sure the bootstrap binaries are all listed where they belong.
+ cat $tmpdir/a
+ grep -E '^export PATH=.*-bootstrap-binaries-0/bin' "$tmpdir/a"
+ grep -E '^export PATH=.*-guile-bootstrap-2.0/bin' "$tmpdir/a"
+ grep -E '^export CPATH=.*-gcc-bootstrap-0/include' "$tmpdir/a"
+ grep -E '^export CPATH=.*-glibc-bootstrap-0/include' "$tmpdir/a"
+ grep -E '^export LIBRARY_PATH=.*-glibc-bootstrap-0/lib' "$tmpdir/a"
fi