mirror of
https://github.com/NixOS/nix.git
synced 2025-12-12 03:51:04 +01:00
Use SRI hash (strings) as the official JSON format for Hash after all
The fact that we were introducing a conversion from the output of `nix path-info` into the input of `builtins.fetchTree` was the deciding factor. We want scripting outputs into inputs like that to be easy. Since JSON strings and objects are trivially distinguishable, we still have the option of introducing the JSON format as an alternative input scheme in the future, should we want to. (The output format would still be SRI in that case, presumably.)
This commit is contained in:
parent
401e08f839
commit
61de9222b0
44 changed files with 78 additions and 348 deletions
|
|
@ -17,11 +17,7 @@ nix-build fixed.nix -A bad --no-out-link && fail "should fail"
|
|||
nix path-info --json --json-format 2 "$path" | jq -e \
|
||||
'.info.[].ca == {
|
||||
method: "flat",
|
||||
hash: {
|
||||
algorithm: "md5",
|
||||
format: "base16",
|
||||
hash: "8ddd8be4b179a529afa5f2ffae4b9858"
|
||||
},
|
||||
hash: "md5-jd2L5LF5pSmvpfL/rkuYWA=="
|
||||
}'
|
||||
|
||||
echo 'testing good...'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue