nix/tests/nix-profile.sh
Eelco Dolstra f66108f738
nix-env: Create ~/.nix-profile automatically
(cherry picked from commit 9348f9291e)
2019-10-10 00:00:54 +02:00

10 lines
370 B
Bash

source common.sh
sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../scripts/nix-profile.sh.in > $TEST_ROOT/nix-profile.sh
user=$(whoami)
rm -rf $TEST_HOME $TEST_ROOT/profile-var
mkdir -p $TEST_HOME
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh; set"
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh" # test idempotency