guix package: Add optional argument to --search-paths.

* guix/scripts/package.scm (search-path-environment-variables): Add #:kind
  parameter.  Pass it to 'environment-variable-definition'.
  (display-search-paths): Add #:kind parameter and pass it to
  'search-path-environment-variables'.
  (%options): Add an optional parameter for "--search-paths".
  (guix-package)[process-query]: Handle it.
* tests/guix-package-net.sh: Adjust existing test.
* tests/guix-package.sh: Adjust existing tests and add new test.
* doc/guix.texi (Invoking guix package): Document it.
This commit is contained in:
Ludovic Courtès 2015-05-20 11:52:45 +02:00
parent 755e1147aa
commit dbc31ab25c
4 changed files with 48 additions and 15 deletions

View file

@ -52,8 +52,13 @@ test -L "$profile" && test -L "$profile-1-link"
test -f "$profile/bin/guile"
# No search path env. var. here.
guix package --search-paths -p "$profile"
test "`guix package --search-paths -p "$profile" | wc -l`" = 0
guix package -p "$profile" --search-paths
guix package -p "$profile" --search-paths | grep '^export PATH='
test "`guix package -p "$profile" --search-paths | wc -l`" = 1 # $PATH
( set -e; set -x; \
eval `guix package --search-paths=prefix -p "$PWD/$profile"`; \
test "`type -P guile`" = "$PWD/$profile/bin/guile" ; \
type -P rm )
# Exit with 1 when a generation does not exist.
if guix package -p "$profile" --delete-generations=42;