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

Create new file-hash files

This commit is contained in:
Carlo Nucera 2020-06-01 17:32:27 -04:00
parent 0cb67ecbd3
commit 0e9438b6d3
8 changed files with 64 additions and 52 deletions

View file

@ -2,6 +2,7 @@
#include "path.hh"
#include "hash.hh"
#include "file-hash.hh"
#include "serialise.hh"
#include "crypto.hh"
#include "lru-cache.hh"
@ -846,15 +847,6 @@ 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(). */
std::string makeFixedOutputCA(FileIngestionMethod method, const Hash & hash);
/* Split URI into protocol+hierarchy part and its parameter set. */
std::pair<std::string, Store::Params> splitUriAndParams(const std::string & uri);