From c9c282cea04ec5a3ee7bd17e6ad8846600220feb Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 30 Oct 2015 21:02:51 -0400 Subject: scripts: environment: Allow lists of packages in expressions. * guix/scripts/environment.scm (options/resolve-packages): Match against lists of packages when evaluating expressions. * tests/guix-environment.sh: Add test. * doc/guix.texi ("invoking guix environment"): Add docs. --- tests/guix-environment.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/guix-environment.sh') diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh index 49b3b1ccc3..f7b0259e1b 100644 --- a/tests/guix-environment.sh +++ b/tests/guix-environment.sh @@ -111,4 +111,15 @@ then 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" + + # Make sure a package list can be used with -e. + expr_list_test_code=" +(list (@@ (gnu packages commencement) gnu-make-boot0) + (@ (gnu packages bootstrap) %bootstrap-guile))" + + guix environment --ad-hoc --no-substitutes --search-paths --pure \ + -e "$expr_list_test_code" > "$tmpdir/a" + + grep -E '^export PATH=.*-make-boot0-4.1/bin' "$tmpdir/a" + grep -E '^export PATH=.*-guile-bootstrap-2.0/bin' "$tmpdir/a" fi -- cgit v1.2.3