1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

Store parsed hashes in DerivationOutput

It's best to detect invalid data as soon as possible, with data types
that make storing it impossible.
This commit is contained in:
John Ericson 2020-03-22 23:43:07 -04:00
parent f5494d9442
commit 832bd534dc
8 changed files with 128 additions and 63 deletions

View file

@ -847,6 +847,9 @@ std::optional<ValidPathInfo> decodeValidPathInfo(
std::istream & str,
bool hashGiven = false);
/* Compute the prefix to the hash algorithm which indicates how the files were
ingested. */
std::string makeFileIngestionPrefix(const FileIngestionMethod m);
/* Compute the content-addressability assertion (ValidPathInfo::ca)
for paths created by makeFixedOutputPath() / addToStore(). */