aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-05-10 10:41:59 -0400
committerGitHub <noreply@github.com>2023-05-10 10:41:59 -0400
commit53a1354acfa9a3d7e0a6c3914ff3c53115d4c452 (patch)
tree650fc498d41d3e6393b09eef60640e0996f420ad /src/libstore/derivations.hh
parent85ff21205104a475c8745c5919aa1378dd49ecad (diff)
parent6a3a87a714e1f3be1464f8fd4c82714b7d032879 (diff)
Merge pull request #3959 from obsidiansystems/ca-drv-exotic
Derivations can output "text-hashed" data
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index d00b23b6d..1e2143f31 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -36,9 +36,11 @@ struct DerivationOutputInputAddressed
struct DerivationOutputCAFixed
{
/**
- * hash used for expected hash computation
+ * Method and hash used for expected hash computation.
+ *
+ * References are not allowed by fiat.
*/
- FixedOutputHash hash;
+ ContentAddress ca;
/**
* Return the \ref StorePath "store path" corresponding to this output
@@ -48,7 +50,7 @@ struct DerivationOutputCAFixed
*/
StorePath path(const Store & store, std::string_view drvName, std::string_view outputName) const;
- GENERATE_CMP(DerivationOutputCAFixed, me->hash);
+ GENERATE_CMP(DerivationOutputCAFixed, me->ca);
};
/**
@@ -61,7 +63,7 @@ struct DerivationOutputCAFloating
/**
* How the file system objects will be serialized for hashing
*/
- FileIngestionMethod method;
+ ContentAddressMethod method;
/**
* How the serialization will be hashed
@@ -88,7 +90,7 @@ struct DerivationOutputImpure
/**
* How the file system objects will be serialized for hashing
*/
- FileIngestionMethod method;
+ ContentAddressMethod method;
/**
* How the serialization will be hashed
@@ -343,12 +345,14 @@ struct Derivation : BasicDerivation
Store & store,
const std::map<std::pair<StorePath, std::string>, StorePath> & inputDrvOutputs) const;
- /* Check that the derivation is valid and does not present any
- illegal states.
-
- This is mainly a matter of checking the outputs, where our C++
- representation supports all sorts of combinations we do not yet
- allow. */
+ /**
+ * Check that the derivation is valid and does not present any
+ * illegal states.
+ *
+ * This is mainly a matter of checking the outputs, where our C++
+ * representation supports all sorts of combinations we do not yet
+ * allow.
+ */
void checkInvariants(Store & store, const StorePath & drvPath) const;
Derivation() = default;