nix-prefetch-git: add sri-hash to output

This commit is contained in:
PedroHLC ☭ 2023-07-01 13:00:08 -03:00
parent 381f0e0c9a
commit 0142902fc4
No known key found for this signature in database
GPG Key ID: DF4C6898CBDC6DF5

View File

@ -390,6 +390,7 @@ print_results() {
"date": "$(json_escape "$commitDateStrict8601")",
"path": "$(json_escape "$finalPath")",
"$(json_escape "$hashType")": "$(json_escape "$hash")",
"hash": "$(nix-hash --to-sri --type $hashType $hash)",
"fetchLFS": $([[ -n "$fetchLFS" ]] && echo true || echo false),
"fetchSubmodules": $([[ -n "$fetchSubmodules" ]] && echo true || echo false),
"deepClone": $([[ -n "$deepClone" ]] && echo true || echo false),