aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/derivations.hh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-05 14:44:39 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-05 14:44:39 +0000
commite7b0847f2d9674bc18532c86b2daf421347513e4 (patch)
tree5a72231f31e926c8575f4f592f65859cc79f168c /src/libstore/derivations.hh
parent839f0fe0956cf4434b64e81a0966e780051901ad (diff)
Make names more consistent
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r--src/libstore/derivations.hh14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh
index b1cda85cb..5a410a164 100644
--- a/src/libstore/derivations.hh
+++ b/src/libstore/derivations.hh
@@ -14,6 +14,7 @@ namespace nix {
/* Abstract syntax of derivations. */
+/* The traditional non-fixed-output derivation type. */
struct DerivationOutputInputAddressed
{
/* Will need to become `std::optional<StorePath>` once input-addressed
@@ -21,12 +22,17 @@ struct DerivationOutputInputAddressed
StorePath path;
};
-struct DerivationOutputFixed
+/* Fixed-output derivations, whose output paths are content addressed
+ according to that fixed output. */
+struct DerivationOutputCAFixed
{
FixedOutputHash hash; /* hash used for expected hash computation */
};
-struct DerivationOutputFloating
+/* Floating-output derivations, whose output paths are content addressed, but
+ not fixed, and so are dynamically calculated from whatever the output ends
+ up being. */
+struct DerivationOutputCAFloating
{
/* information used for expected hash computation */
FileIngestionMethod method;
@@ -37,8 +43,8 @@ struct DerivationOutput
{
std::variant<
DerivationOutputInputAddressed,
- DerivationOutputFixed,
- DerivationOutputFloating
+ DerivationOutputCAFixed,
+ DerivationOutputCAFloating
> output;
std::optional<HashType> hashAlgoOpt(const Store & store) const;
std::optional<StorePath> pathOpt(const Store & store, std::string_view drvName) const;