mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 15:32:43 +01:00
Organize content addressing, use SourceAccessor with Store::addToStore
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
parent
d19a667528
commit
dfc876531f
38 changed files with 515 additions and 390 deletions
|
|
@ -168,14 +168,11 @@ Hash hashString(HashAlgorithm ha, std::string_view s);
|
|||
Hash hashFile(HashAlgorithm ha, const Path & path);
|
||||
|
||||
/**
|
||||
* Compute the hash of the given path, serializing as a Nix Archive and
|
||||
* then hashing that.
|
||||
* The final hash and the number of bytes digested.
|
||||
*
|
||||
* The hash is defined as (essentially) hashString(ht, dumpPath(path)).
|
||||
* @todo Convert to proper struct
|
||||
*/
|
||||
typedef std::pair<Hash, uint64_t> HashResult;
|
||||
HashResult hashPath(HashAlgorithm ha, const Path & path,
|
||||
PathFilter & filter = defaultPathFilter);
|
||||
|
||||
/**
|
||||
* Compress a hash to the specified number of bytes by cyclically
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue