1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Merge pull request #11020 from DeterminateSystems/fix-tarball-caching

Tarball fetcher: Fix fetchToStore() and eval caching
This commit is contained in:
Eelco Dolstra 2024-07-05 16:30:12 +02:00 committed by GitHub
commit e1b6b3ce27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 33 additions and 2 deletions

View file

@ -195,6 +195,7 @@ json=$(nix flake metadata flake1 --json | jq .)
[[ -d $(echo "$json" | jq -r .path) ]]
[[ $(echo "$json" | jq -r .lastModified) = $(git -C "$flake1Dir" log -n1 --format=%ct) ]]
hash1=$(echo "$json" | jq -r .revision)
[[ -n $(echo "$json" | jq -r .fingerprint) ]]
echo foo > "$flake1Dir/foo"
git -C "$flake1Dir" add $flake1Dir/foo

View file

@ -70,6 +70,9 @@ in
# Check that we got redirected to the immutable URL.
assert info["locked"]["url"] == "http://localhost/stable/${nixpkgs.rev}.tar.gz"
# Check that we got a fingerprint for caching.
assert info["fingerprint"]
# Check that we got the rev and revCount attributes.
assert info["revision"] == "${nixpkgs.rev}"
assert info["revCount"] == 1234