diff options
author | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-07-17 11:32:59 -0400 |
---|---|---|
committer | Carlo Nucera <carlo.nucera@protonmail.com> | 2020-07-17 11:32:59 -0400 |
commit | 487c5751c64efa9d39c9e39d16eb1fee9fc0d941 (patch) | |
tree | 3d1f24c336ea316d951d39222c7b06a15bc24cd6 /src/libstore/derivations.hh | |
parent | a395c12830e0cd373e0f3b7a56dc8b6bb8b00f1b (diff) | |
parent | d9fb9e9f26e29d9d9001af700deada32ca740cf6 (diff) |
Merge branch 'ca-drv' of github.com:Ericson2314/nix into misc-ca
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index c57468fac..45217b3d5 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -58,6 +58,24 @@ typedef std::map<StorePath, StringSet> DerivationInputs; typedef std::map<string, string> StringPairs; +enum struct DerivationType : uint8_t { + Regular, + CAFixed, +}; + +/* Do the outputs of the derivation have paths calculated from their content, + or from the derivation itself? */ +bool derivationIsCA(DerivationType); + +/* Is the content of the outputs fixed a-priori via a hash? Never true for + non-CA derivations. */ +bool derivationIsFixed(DerivationType); + +/* Is the derivation impure and needs to access non-deterministic resources, or + pure and can be sandboxed? Note that whether or not we actually sandbox the + derivation is controlled separately. Never true for non-CA derivations. */ +bool derivationIsImpure(DerivationType); + struct BasicDerivation { DerivationOutputs outputs; /* keyed on symbolic IDs */ @@ -78,7 +96,7 @@ struct BasicDerivation bool isBuiltin() const; /* Return true iff this is a fixed-output derivation. */ - bool isFixedOutput() const; + DerivationType type() const; /* Return the output paths of a derivation. */ StorePathSet outputPaths(const Store & store) const; |