aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-23 16:30:42 +0200
committerregnat <rg@regnat.ovh>2020-10-27 07:29:23 +0100
commitc092fa4702215fdb61611c5dd28194401d056170 (patch)
treea9db7d344fb17377c02852b9a76e8716ba925b19 /src/libstore/derivations.hh
parente0ca98c2071b815578470e280df8fdb750c7e23b (diff)
Allow non-CA derivations to depend on CA derivations
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index 6d292b2e5..f9ba935e6 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -41,12 +41,18 @@ struct DerivationOutputCAFloating
HashType hashType;
};
+/* Input-addressed output which depends on a (CA) derivation whose hash isn't
+ * known atm
+ */
+struct DerivationOutputDeferred {};
+
struct DerivationOutput
{
std::variant<
DerivationOutputInputAddressed,
DerivationOutputCAFixed,
- DerivationOutputCAFloating
+ DerivationOutputCAFloating,
+ DerivationOutputDeferred
> output;
std::optional<HashType> hashAlgoOpt(const Store & store) const;
/* Note, when you use this function you should make sure that you're passing
@@ -72,6 +78,7 @@ typedef std::map<string, string> StringPairs;
enum struct DerivationType : uint8_t {
InputAddressed,
+ DeferredInputAddressed,
CAFixed,
CAFloating,
};
@@ -167,9 +174,12 @@ std::string outputPathName(std::string_view drvName, std::string_view outputName
// whose output hashes are always known since they are fixed up-front.
typedef std::map<std::string, Hash> CaOutputHashes;
+struct UnknownHashes {};
+
typedef std::variant<
Hash, // regular DRV normalized hash
- CaOutputHashes
+ CaOutputHashes, // Fixed-output derivation hashes
+ UnknownHashes // Deferred hashes for floating outputs drvs and their dependencies
> DrvHashModulo;
/* Returns hashes with the details of fixed-output subderivations