Merge pull request #241 from sternenseemann/nix-2.3-install-check

agenix: fix installCheckPhase with Nix 2.3
This commit is contained in:
Nathan Henrie 2024-05-24 08:40:46 -06:00 committed by GitHub
commit c2fc0762bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,9 +30,13 @@ in
shellcheck ${bin}
${bin} -h | grep ${version}
HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
test_tmp=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
export HOME="$test_tmp/home"
export NIX_STORE_DIR="$test_tmp/nix/store"
export NIX_STATE_DIR="$test_tmp/nix/var"
mkdir -p "$HOME" "$NIX_STORE_DIR" "$NIX_STATE_DIR"
function cleanup {
rm -rf $HOME
rm -rf "$test_tmp"
}
trap "cleanup" 0 2 3 15