mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
FileSystemHash -> DerivationOutputHash
This commit is contained in:
parent
517f5980e2
commit
237d88c97e
4 changed files with 15 additions and 15 deletions
|
@ -13,23 +13,23 @@ namespace nix {
|
|||
/* Abstract syntax of derivations. */
|
||||
|
||||
/// Pair of a hash, and how the file system was ingested
|
||||
struct FileSystemHash {
|
||||
struct DerivationOutputHash {
|
||||
FileIngestionMethod method;
|
||||
Hash hash;
|
||||
FileSystemHash(FileIngestionMethod method, Hash hash)
|
||||
DerivationOutputHash(FileIngestionMethod method, Hash hash)
|
||||
: method(std::move(method))
|
||||
, hash(std::move(hash))
|
||||
{ }
|
||||
FileSystemHash(const FileSystemHash &) = default;
|
||||
FileSystemHash(FileSystemHash &&) = default;
|
||||
FileSystemHash & operator = (const FileSystemHash &) = default;
|
||||
DerivationOutputHash(const DerivationOutputHash &) = default;
|
||||
DerivationOutputHash(DerivationOutputHash &&) = default;
|
||||
DerivationOutputHash & operator = (const DerivationOutputHash &) = default;
|
||||
std::string printMethodAlgo() const;
|
||||
};
|
||||
|
||||
struct DerivationOutput
|
||||
{
|
||||
StorePath path;
|
||||
std::optional<FileSystemHash> hash; /* hash used for expected hash computation */
|
||||
std::optional<DerivationOutputHash> hash; /* hash used for expected hash computation */
|
||||
void parseHashInfo(FileIngestionMethod & recursive, Hash & hash) const;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue