aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-19 14:22:06 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-19 14:22:06 -0400
commit2796b01e863bf3a6d28cc89bb46c6388d8b73fbc (patch)
tree20fec553f605b3a6f7474cd337eb457c9a8a56f1 /src/libstore/derivations.hh
parent5e631e3304aaf00b912c12025debfd35942a0ca9 (diff)
parent424bb5819f736af7413c343d462663474222eaac (diff)
Merge remote-tracking branch 'origin/master' into substitute-other-storedir
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;
};