git.iko.soy/typeable/nixpkgs
on master help sign in
nixpkgs-basic-release-checks: set NIX_STORE_DIR

With nix 2.4 the fact that we set NIX_STATE_DIR, but kept the original store became a hard error. We work around it here by forcing the use of a fresh, sandbox-local, store. See regnat's wonderful analysis for more information: https://github.com/NixOS/nix/issues/5495#issuecomment-963949707

commitca5ecbed4b5775f873fa15d7bf064b00d9e2862a authorBernardo Meurer <bernardo@meurer.org> dateTue 9 Nov 2021, 10:55 (5 years ago) parent90c1cdd
1 file changed+2−1
pkgs/top-level/nixpkgs-basic-release-checks.nix+2−1
pkgs/top-level/nixpkgs-basic-release-checks.nix+2−1
@@ -3,7 +3,8 @@
33pkgs.runCommand "nixpkgs-release-checks" { src = nixpkgs; buildInputs = [nix]; } ''
44 set -o pipefail
55
6− export NIX_STATE_DIR=$TMPDIR
6+ export NIX_STORE_DIR=$TMPDIR/store
7+ export NIX_STATE_DIR=$TMPDIR/state
78 export NIX_PATH=nixpkgs=$TMPDIR/barf.nix
89 opts=(--option build-users-group "")
910 nix-store --init