about summary refs log tree commit diff
path: root/nixpkgs/lib/tests/test-with-nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/lib/tests/test-with-nix.nix')
-rw-r--r--nixpkgs/lib/tests/test-with-nix.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/nixpkgs/lib/tests/test-with-nix.nix b/nixpkgs/lib/tests/test-with-nix.nix
index fd2e7532e697..9d66b91cab42 100644
--- a/nixpkgs/lib/tests/test-with-nix.nix
+++ b/nixpkgs/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