diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-06-30 23:23:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-07-01 23:29:49 +0200 |
commit | 6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f (patch) | |
tree | 9033f05ea626c88134fa31aec72669e8bb9f1b60 /tests | |
parent | cad252644930b81021484dfdb9d321c61f218842 (diff) | |
download | patches-6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f.tar patches-6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f.tar.gz |
environment: Add only the specified outputs of the dependencies.
Before that, 'guix environment guile' (for instance) would define environment
variables that would refer to the "include" output of Bash, the "debug" output
of libgc, etc., even though these are not listed as inputs in the recipe of
'guile'.
* guix/gexp.scm (lower-inputs): Export.
* guix/scripts/environment.scm (evaluate-input-search-paths): Remove
'derivations' parameter; add 'search-paths'. Expect 'inputs' to be
a list of tuples. Adjust callers.
(create-environment): Remove 'derivations' parameter; add 'search-paths'.
(show-search-paths): Likewise.
(package+propagated-inputs): New procedure.
(packages->transitive-inputs, packages+propagated-inputs): Remove.
(build-inputs): Expect INPUTS to be a list of derivation tuples.
(guix-environment): Compute INPUTS using 'package+propagated-inputs',
'package->bag', and 'bag-transitive-inputs'. Move 'run-with-store' higher.
* tests/guix-environment.sh: Add test with FINDUTILS-BOOT0.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-environment.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/guix-environment.sh b/tests/guix-environment.sh index 3d92d226f2..d04e6a6ea0 100644 --- a/tests/guix-environment.sh +++ b/tests/guix-environment.sh @@ -58,4 +58,24 @@ then --exec='echo $PATH $CPATH $LIBRARY_PATH' > "$tmpdir/b" ( . "$tmpdir/a" ; echo $PATH $CPATH $LIBRARY_PATH ) > "$tmpdir/c" cmp "$tmpdir/b" "$tmpdir/c" + + rm "$tmpdir"/* + + # Compute the build environment for the initial GNU Findutils. + guix environment -e '(@@ (gnu packages commencement) findutils-boot0)' \ + --no-substitutes --search-paths --pure > "$tmpdir/a" + + # Make sure the bootstrap binaries are all listed where they belong. + grep -E '^export PATH=.*-bootstrap-binaries-0/bin' "$tmpdir/a" + grep -E '^export PATH=.*-make-boot0-[0-9.]+/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" + + # The following test assumes 'make-boot0' has a "debug" output. + make_boot0_debug="`guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)' | grep -e -debug`" + test "x$make_boot0_debug" != "x" + + # Make sure the "debug" output is not listed. + if grep -E "$make_boot0_debug" "$tmpdir/a"; then false; else true; fi fi |