aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
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 d349c6d4d..7b677ca49 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;
};