From 609c8799fa2f2d85d4d709f826f740b69cbdaba9 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Thu, 14 Aug 2025 22:51:59 +0300 Subject: [PATCH] lib/tests/test-with-nix: run lib/tests/fetchers.nix in the derivation This suffers from the same issue as misc.nix tests, because they were evaluated by the host nix, not the one that is being tested. --- lib/tests/test-with-nix.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tests/test-with-nix.nix b/lib/tests/test-with-nix.nix index 4e13eef4c5b1..4fc65010b878 100644 --- a/lib/tests/test-with-nix.nix +++ b/lib/tests/test-with-nix.nix @@ -18,7 +18,6 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" { buildInputs = [ - (import ./fetchers.nix) (import ../path/tests { inherit pkgs; }) @@ -73,6 +72,9 @@ pkgs.runCommand "nixpkgs-lib-tests-nix-${nix.version}" echo "Running lib/tests/misc.nix" [[ $(nix-instantiate --eval --strict lib/tests/misc.nix | tee /dev/stderr) == '[ ]' ]]; + echo "Running lib/tests/fetchers.nix" + [[ $(nix-instantiate --eval --strict lib/tests/fetchers.nix | tee /dev/stderr) == '[ ]' ]]; + mkdir $out echo success > $out/${nix.version} ''