diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/local.mk | 1 | ||||
-rw-r--r-- | tests/nix_path.sh | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk index 47d2862a4..2ec9baa12 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -63,6 +63,7 @@ nix_tests = \ eval-store.sh \ readfile-context.sh \ store-ping.sh \ + nix_path.sh \ why-depends.sh # parallel.sh diff --git a/tests/nix_path.sh b/tests/nix_path.sh new file mode 100644 index 000000000..d3657abf0 --- /dev/null +++ b/tests/nix_path.sh @@ -0,0 +1,11 @@ +# Regression for https://github.com/NixOS/nix/issues/5998 and https://github.com/NixOS/nix/issues/5980 + +source common.sh + +export NIX_PATH=non-existent=/non-existent/but-unused-anyways:by-absolute-path=$PWD:by-relative-path=. + +nix-instantiate --eval -E '<by-absolute-path/simple.nix>' --restrict-eval +nix-instantiate --eval -E '<by-relative-path/simple.nix>' --restrict-eval + +# Should ideally also test this, but there’s no pure way to do it, so just trust me that it works +# nix-instantiate --eval -E '<nixpkgs>' -I nixpkgs=channel:nixos-unstable --restrict-eval |