summaryrefslogtreecommitdiff
path: root/tests/guix-package.sh
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-01-14 23:44:58 +0100
committerLudovic Courtès <ludo@gnu.org>2013-01-14 23:44:58 +0100
commit0ec1af59e564c00fb48359fec84d049138589dee (patch)
tree9fa48723892f3aa8f944c7c6f7f2fc688151e3ed /tests/guix-package.sh
parent2a5ab9dceba14b14170d87d180e9422299ac713e (diff)
downloadpatches-0ec1af59e564c00fb48359fec84d049138589dee.tar
patches-0ec1af59e564c00fb48359fec84d049138589dee.tar.gz
guix-package: Create or diagnose missing profile directory.
Reported by Andreas Enge. * guix-package.in (%profile-directory): Honor $NIX_STATE_DIR. (guix-package)[ensure-default-profile]: Use it. [process-actions]: Call it when the `profile' option is %CURRENT-PROFILE. * tests/guix-package.sh: Add installation test with $HOME set, using the default profile.
Diffstat (limited to 'tests/guix-package.sh')
-rw-r--r--tests/guix-package.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/tests/guix-package.sh b/tests/guix-package.sh
index 6c8258032b..e5b8db7088 100644
--- a/tests/guix-package.sh
+++ b/tests/guix-package.sh
@@ -25,10 +25,11 @@ guix-package --version
profile="t-profile-$$"
rm -f "$profile"
-trap 'rm "$profile" "$profile-"[0-9]*' EXIT
+trap 'rm "$profile" "$profile-"[0-9]* ; rm -rf t-home-'"$$" EXIT
-guix-package --bootstrap -p "$profile" \
- -i `guix-build -e '(@@ (distro packages base) %bootstrap-guile)'`
+boot_guile="`guix-build -e '(@ (distro packages bootstrap) %bootstrap-guile)'`"
+
+guix-package --bootstrap -p "$profile" -i "$boot_guile"
test -L "$profile" && test -L "$profile-1-link"
test -f "$profile/bin/guile"
@@ -75,3 +76,15 @@ guix-package --bootstrap -i "binutils:lib" -p "$profile" -n
# Check whether `--list-available' returns something sensible.
guix-package -A 'gui.*e' | grep guile
+# Try with the default profile.
+
+XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
+export XDG_CACHE_HOME
+HOME="t-home-$$"
+export HOME
+
+mkdir -p "$HOME"
+
+guix-package --bootstrap -i "$boot_guile"
+test -L "$HOME/.guix-profile"
+test -f "$HOME/.guix-profile/bin/guile"