aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorNick Van den Broeck <nick.van.den.broeck666@gmail.com>2019-02-21 06:53:01 +0100
committerNick Van den Broeck <nick.van.den.broeck666@gmail.com>2019-02-26 13:12:51 +0100
commitcfb6ab80cea7f0ed3f525e8120f2e569f963fa0e (patch)
treeb4b170bd2cd073c2aae648bb72a78a51feb2b6a1 /src/libexpr
parentd342de02b9f7ee07f22e1986af8d5c8eb325d8ba (diff)
Implemented "nix flake info"
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops/flake.cc13
-rw-r--r--src/libexpr/primops/flake.hh14
2 files changed, 14 insertions, 13 deletions
diff --git a/src/libexpr/primops/flake.cc b/src/libexpr/primops/flake.cc
index 3998f9ef9..9f137a0b9 100644
--- a/src/libexpr/primops/flake.cc
+++ b/src/libexpr/primops/flake.cc
@@ -141,19 +141,6 @@ static FlakeSourceInfo fetchFlake(EvalState & state, const FlakeRef & flakeRef)
else abort();
}
-struct Flake
-{
- FlakeId id;
- std::string description;
- Path path;
- std::vector<FlakeRef> requires;
- std::unique_ptr<FlakeRegistry> lockFile;
- Value * vProvides; // FIXME: gc
- // commit hash
- // date
- // content hash
-};
-
static Flake getFlake(EvalState & state, const FlakeRef & flakeRef)
{
auto sourceInfo = fetchFlake(state, flakeRef);
diff --git a/src/libexpr/primops/flake.hh b/src/libexpr/primops/flake.hh
index e504dc196..af28bc5b0 100644
--- a/src/libexpr/primops/flake.hh
+++ b/src/libexpr/primops/flake.hh
@@ -21,4 +21,18 @@ Value * makeFlakeRegistryValue(EvalState & state);
Value * makeFlakeValue(EvalState & state, std::string flakeUri, Value & v);
+struct Flake
+{
+ FlakeId id;
+ std::string description;
+ Path path;
+ std::vector<FlakeRef> requires;
+ std::unique_ptr<FlakeRegistry> lockFile;
+ Value * vProvides; // FIXME: gc
+ // commit hash
+ // date
+ // content hash
+};
+
+static Flake getFlake(EvalState & state, const FlakeRef & flakeRef);
}