aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/flake/flake.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-11 14:40:21 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-06-11 14:40:21 +0200
commit0c62b4ad0f80d2801a7e7caabf20cc8e50182540 (patch)
tree583ef5ad90342e0d789d21ec748d650c91367992 /src/libexpr/flake/flake.hh
parent195ed43b60cc2a2a18adc24e272a3d90466c9bc7 (diff)
Represent 'follows' inputs explicitly in the lock file
This fixes an issue where lockfile generation was not idempotent: after updating a lockfile, a "follows" node would end up pointing to a new copy of the node, rather than to the original node.
Diffstat (limited to 'src/libexpr/flake/flake.hh')
-rw-r--r--src/libexpr/flake/flake.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/flake/flake.hh b/src/libexpr/flake/flake.hh
index ebf81362c..77f3abdeb 100644
--- a/src/libexpr/flake/flake.hh
+++ b/src/libexpr/flake/flake.hh
@@ -19,9 +19,10 @@ typedef std::map<FlakeId, FlakeInput> FlakeInputs;
struct FlakeInput
{
- FlakeRef ref;
+ std::optional<FlakeRef> ref;
bool isFlake = true;
std::optional<InputPath> follows;
+ bool absolute = false; // whether 'follows' is relative to the flake root
FlakeInputs overrides;
};