1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-11 21:16:02 +01:00

Fix eval caching for path flakes

This fix is somewhat hacky since the accessor/input fingerprint
situation is a bit of a mess.
This commit is contained in:
Eelco Dolstra 2025-06-27 20:02:18 +02:00
parent 51acb1d4bc
commit 38a73203a4
2 changed files with 3 additions and 0 deletions

View file

@ -354,6 +354,8 @@ std::pair<ref<SourceAccessor>, Input> Input::getAccessorUnchecked(ref<Store> sto
if (!accessor->fingerprint)
accessor->fingerprint = result.getFingerprint(store);
else
result.cachedFingerprint = accessor->fingerprint;
return {accessor, std::move(result)};
}

View file

@ -374,6 +374,7 @@ nix build -o $TEST_ROOT/result git+file://$flakeGitBare
mkdir -p $flake5Dir
writeDependentFlake $flake5Dir
nix flake lock path://$flake5Dir
[[ "$(nix flake metadata path://$flake5Dir --json | jq -r .fingerprint)" != null ]]
# Test tarball flakes.
tar cfz $TEST_ROOT/flake.tar.gz -C $TEST_ROOT flake5