diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-24 15:41:29 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-24 15:41:29 +0000 |
commit | d9fb9e9f26e29d9d9001af700deada32ca740cf6 (patch) | |
tree | a288f855e465f7abf8bd5c09c40af98213c74e03 /src/libstore/derivations.hh | |
parent | 93bbe6e8ab9ae4b76942a2acafa072483be20807 (diff) | |
parent | 3c50e84387e51858f10c540e721a938592f30949 (diff) |
Merge remote-tracking branch 'upstream/master' into ca-drv
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index 1dcfc035d..df31e6a93 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -1,8 +1,9 @@ #pragma once +#include "path.hh" #include "types.hh" #include "hash.hh" -#include "store-api.hh" +#include "content-address.hh" #include <map> @@ -12,18 +13,10 @@ 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::optional<DerivationOutputHash> hash; /* hash used for expected hash computation */ - void parseHashInfo(FileIngestionMethod & recursive, Hash & hash) const; + std::optional<FixedOutputHash> hash; /* hash used for expected hash computation */ }; typedef std::map<string, DerivationOutput> DerivationOutputs; @@ -94,6 +87,7 @@ struct Derivation : BasicDerivation class Store; +enum RepairFlag : bool { NoRepair = false, Repair = true }; /* Write a derivation to the Nix store, and return its path. */ StorePath writeDerivation(ref<Store> store, |