environment: Add only the specified outputs of the dependencies.
authorLudovic Courtès <ludo@gnu.org>
Tue, 30 Jun 2015 21:23:06 +0000 (23:23 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 1 Jul 2015 21:29:49 +0000 (23:29 +0200)
commit6b6298ae39bfe185ce1ab18bb3d641ddfad17c8f
tree9033f05ea626c88134fa31aec72669e8bb9f1b60
parentcad252644930b81021484dfdb9d321c61f218842
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.
guix/gexp.scm
guix/scripts/environment.scm
tests/guix-environment.sh