diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-04-16 14:08:14 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-04-16 14:08:14 +0200 |
commit | aecf07b1d6c21b8f402545912ae6c053d0f12a11 (patch) | |
tree | 9dd9c4bfbcaee558281b1f33a2d96f2a9083e16e | |
parent | 035ac443544b46dc87274ed1eb1393b07db0912c (diff) |
Remove dead function
-rw-r--r-- | src/libexpr/primops/flake.cc | 26 | ||||
-rw-r--r-- | src/libexpr/primops/flake.hh | 2 |
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 &); |