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
This allows the aliases file to produce deprecation warnings
without triggering the check against warnings. This allows
for a better user experience when deprecations occur.
Moreover, Nixpkgs itself shouldn't rely on its backcompat aliases.