aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 20:39:10 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-21 20:39:10 +0000
commit8313f0e939a99b1f715695c0e798cfb368dfc1f2 (patch)
tree11267fbf06412c79395a6d05ec77872bc5e0761f /src/libstore/derivations.hh
parent18493fd9c48676ab26854739db67ac5d76ff9347 (diff)
parent984e521392b3f41f7cdab203e5c00f3e00e27a28 (diff)
Merge remote-tracking branch 'upstream/master' into derivation-header-include-order
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 2adbf6b94..d09db53f2 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -12,11 +12,17 @@ namespace nix {
/* Abstract syntax of derivations. */
+/// Pair of a hash, and how the file system was ingested
+struct DerivationOutputHash {
+ FileIngestionMethod method;
+ Hash hash;
+ std::string printMethodAlgo() const;
+};
+
struct DerivationOutput
{
StorePath path;
- std::string hashAlgo; /* hash used for expected hash computation */
- std::string hash; /* expected hash, may be null */
+ std::optional<DerivationOutputHash> hash; /* hash used for expected hash computation */
void parseHashInfo(FileIngestionMethod & recursive, Hash & hash) const;
};