mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
nix path-info --json: Print hash in SRI format
(cherry picked from commit 442e665d6d
)
This commit is contained in:
parent
7a8de57d3e
commit
777e21e596
3 changed files with 6 additions and 3 deletions
|
@ -441,7 +441,9 @@ string Store::makeValidityRegistration(const StorePathSet & paths,
|
|||
|
||||
|
||||
void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const StorePathSet & storePaths,
|
||||
bool includeImpureInfo, bool showClosureSize, AllowInvalidFlag allowInvalid)
|
||||
bool includeImpureInfo, bool showClosureSize,
|
||||
Base hashBase,
|
||||
AllowInvalidFlag allowInvalid)
|
||||
{
|
||||
auto jsonList = jsonOut.list();
|
||||
|
||||
|
@ -453,7 +455,7 @@ void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const StorePathSet & store
|
|||
auto info = queryPathInfo(storePath);
|
||||
|
||||
jsonPath
|
||||
.attr("narHash", info->narHash.to_string())
|
||||
.attr("narHash", info->narHash.to_string(hashBase))
|
||||
.attr("narSize", info->narSize);
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue