mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Add docs/rl-notes for nix hash convert
/ builtins.convertHash
https://github.com/NixOS/nix/issues/8876
This commit is contained in:
parent
7ff876b92b
commit
8afeaf05c4
4 changed files with 74 additions and 5 deletions
|
@ -1339,7 +1339,7 @@ drvName, Bindings * attrs, Value & v)
|
|||
.errPos = state.positions[noPos]
|
||||
});
|
||||
|
||||
auto ht = parseHashAlgoOpt(outputHashAlgo).value_or(HashAlgorithm::SHA256);
|
||||
auto ha = parseHashAlgoOpt(outputHashAlgo).value_or(HashAlgorithm::SHA256);
|
||||
auto method = ingestionMethod.value_or(FileIngestionMethod::Recursive);
|
||||
|
||||
for (auto & i : outputs) {
|
||||
|
@ -1348,13 +1348,13 @@ drvName, Bindings * attrs, Value & v)
|
|||
drv.outputs.insert_or_assign(i,
|
||||
DerivationOutput::Impure {
|
||||
.method = method,
|
||||
.hashAlgo = ht,
|
||||
.hashAlgo = ha,
|
||||
});
|
||||
else
|
||||
drv.outputs.insert_or_assign(i,
|
||||
DerivationOutput::CAFloating {
|
||||
.method = method,
|
||||
.hashAlgo = ht,
|
||||
.hashAlgo = ha,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -3837,7 +3837,7 @@ static RegisterPrimOp primop_convertHash({
|
|||
|
||||
The format of the resulting hash. Must be one of
|
||||
- `"base16"`
|
||||
- `"base32"`
|
||||
- `"nix32"`
|
||||
- `"base64"`
|
||||
- `"sri"`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue