diff options
Diffstat (limited to 'src/libexpr/flake/lockfile.cc')
-rw-r--r-- | src/libexpr/flake/lockfile.cc | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/libexpr/flake/lockfile.cc b/src/libexpr/flake/lockfile.cc index 3d796eadc..bf55b4e3b 100644 --- a/src/libexpr/flake/lockfile.cc +++ b/src/libexpr/flake/lockfile.cc @@ -8,18 +8,7 @@ namespace nix::flake { FlakeRef flakeRefFromJson(const nlohmann::json & json) { - fetchers::Input::Attrs attrs; - - for (auto & i : json.items()) { - if (i.value().is_number()) - attrs.emplace(i.key(), i.value().get<int64_t>()); - else if (i.value().is_string()) - attrs.emplace(i.key(), i.value().get<std::string>()); - else - throw Error("unsupported input attribute type in lock file"); - } - - return FlakeRef::fromAttrs(attrs); + return FlakeRef::fromAttrs(jsonToAttrs(json)); } FlakeRef getFlakeRef( |