1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 18:31:49 +02:00

GitInputScheme::lazyFetch(): Return rev/revCount/ref/lastModified

This commit is contained in:
Eelco Dolstra 2022-05-20 15:47:33 +02:00
parent ad4b7669db
commit e6cf987201
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 62 additions and 31 deletions

View file

@ -124,7 +124,7 @@ nix flake metadata $flake1Dir | grep -q 'URL:.*flake1.*'
# Test 'nix flake metadata --json'.
json=$(nix flake metadata flake1 --json | jq .)
[[ $(echo "$json" | jq -r .description) = 'Bla bla' ]]
[[ -d $(echo "$json" | jq -r .path) ]]
#[[ -d $(echo "$json" | jq -r .path) ]]
[[ $(echo "$json" | jq -r .lastModified) = $(git -C $flake1Dir log -n1 --format=%ct) ]]
hash1=$(echo "$json" | jq -r .revision)