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.

(cherry picked from commit 609c8799fa)
This commit is contained in:
Sergei Zimmerman
2025-08-14 22:51:59 +03:00
committed by github-actions[bot]
parent da5d00ad9c
commit d5edba18e8

View File

@@ -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}
''