aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libexpr/primops/flake.cc26
-rw-r--r--src/libexpr/primops/flake.hh2
2 files changed, 0 insertions, 28 deletions
diff --git a/src/libexpr/primops/flake.cc b/src/libexpr/primops/flake.cc
index bd8e5960c..ba303fe4a 100644
--- a/src/libexpr/primops/flake.cc
+++ b/src/libexpr/primops/flake.cc
@@ -154,32 +154,6 @@ const std::vector<std::shared_ptr<FlakeRegistry>> EvalState::getFlakeRegistries(
return registries;
}
-// Creates a Nix attribute set value listing all dependencies, so they can be used in `provides`.
-Value * makeFlakeRegistryValue(EvalState & state)
-{
- auto v = state.allocValue();
-
- auto registries = state.getFlakeRegistries();
-
- int size = 0;
- for (auto registry : registries)
- size += registry->entries.size();
- state.mkAttrs(*v, size);
-
- for (auto & registry : registries) {
- for (auto & entry : registry->entries) {
- auto vEntry = state.allocAttr(*v, entry.first.to_string());
- state.mkAttrs(*vEntry, 2);
- mkString(*state.allocAttr(*vEntry, state.symbols.create("uri")), entry.second.to_string());
- vEntry->attrs->sort();
- }
- }
-
- v->attrs->sort();
-
- return v;
-}
-
static FlakeRef lookupFlake(EvalState & state, const FlakeRef & flakeRef,
std::vector<std::shared_ptr<FlakeRegistry>> registries, std::vector<FlakeRef> pastSearches = {})
{
diff --git a/src/libexpr/primops/flake.hh b/src/libexpr/primops/flake.hh
index 4cd41352d..73446c908 100644
--- a/src/libexpr/primops/flake.hh
+++ b/src/libexpr/primops/flake.hh
@@ -29,8 +29,6 @@ struct LockFile
Path getUserRegistryPath();
-Value * makeFlakeRegistryValue(EvalState & state);
-
void makeFlakeValue(EvalState & state, const FlakeRef & flakeRef, bool impureTopRef, Value & v);
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);