diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-03-01 21:12:32 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-03-01 21:54:56 +0100 |
commit | 5d4b411f8a3372455a8c92d10a28e88e9edba6eb (patch) | |
tree | a5ae425d43fa307dc3e86166d1901905727c66b3 /tests | |
parent | 431a35518f74f50238ccc106a6a3121a9fcc11b9 (diff) | |
download | patches-5d4b411f8a3372455a8c92d10a28e88e9edba6eb.tar patches-5d4b411f8a3372455a8c92d10a28e88e9edba6eb.tar.gz |
guix package: Add `--install-from-expression'.
* guix/scripts/package.scm (read/eval-package-expression): New
procedure.
(show-help): Add `-e'.
(%options): Likewise.
(guix-package)[process-actions]: Handle ('install . p) pairs, where P
is a package.
* tests/guix-package.sh: Add `boot_make_drv'. Use `-i $boot_make_drv'
once, and then use `-e $boot_make'.
* doc/guix.texi (Invoking guix package): Document `-e'.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-package.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh index cf8bc5c7e8..f84893ba0b 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -33,6 +33,10 @@ rm -f "$profile" trap 'rm "$profile" "$profile-"[0-9]* ; rm -rf t-home-'"$$" EXIT +# Use `-e' with a non-package expression. +if guix package --bootstrap -e +; +then false; else true; fi + guix package --bootstrap -p "$profile" -i guile-bootstrap test -L "$profile" && test -L "$profile-1-link" test -f "$profile/bin/guile" @@ -46,8 +50,9 @@ test -f "$profile/bin/guile" # Check whether we have network access. if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null then - boot_make="`guix build -e '(@@ (gnu packages base) gnu-make-boot0)'`" - guix package --bootstrap -p "$profile" -i "$boot_make" + boot_make="(@@ (gnu packages base) gnu-make-boot0)" + boot_make_drv="`guix build -e "$boot_make"`" + guix package --bootstrap -p "$profile" -i "$boot_make_drv" test -L "$profile-2-link" test -f "$profile/bin/make" && test -f "$profile/bin/guile" @@ -94,7 +99,7 @@ then done # Reinstall after roll-back to the empty profile. - guix package --bootstrap -p "$profile" -i "$boot_make" + guix package --bootstrap -p "$profile" -e "$boot_make" test "`readlink_base "$profile"`" = "$profile-1-link" test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" @@ -104,7 +109,7 @@ then test -x "$profile/bin/guile" && ! test -x "$profile/bin/make" # Install Make. - guix package --bootstrap -p "$profile" -i "$boot_make" + guix package --bootstrap -p "$profile" -e "$boot_make" test "`readlink_base "$profile"`" = "$profile-2-link" test -x "$profile/bin/guile" && test -x "$profile/bin/make" @@ -145,7 +150,7 @@ test -f "$HOME/.guix-profile/bin/guile" if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null then - guix package --bootstrap -i "$boot_make" + guix package --bootstrap -e "$boot_make" test -f "$HOME/.guix-profile/bin/make" first_environment="`cd $HOME/.guix-profile ; pwd`" |