diff --git a/lib/tests/test-with-nix.nix b/lib/tests/test-with-nix.nix index fd2e7532e697..9d66b91cab42 100644 --- a/lib/tests/test-with-nix.nix +++ b/lib/tests/test-with-nix.nix @@ -53,6 +53,12 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" { echo "Running lib/tests/modules.sh" bash lib/tests/modules.sh + echo "Checking lib.version" + nix-instantiate lib -A version --eval || { + echo "lib.version does not evaluate when lib is isolated from the rest of the nixpkgs tree" + exit 1 + } + echo "Running lib/tests/filesystem.sh" TEST_LIB=$PWD/lib bash lib/tests/filesystem.sh