mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 23:06:16 +02:00
Fix build
This commit is contained in:
parent
212e28d945
commit
a0ed002ba9
2 changed files with 3 additions and 7 deletions
|
@ -66,8 +66,10 @@ std::shared_ptr<Node> LockFile::findInput(const InputPath & path)
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
LockFile::LockFile(const nlohmann::json & json, std::string_view path)
|
LockFile::LockFile(std::string_view contents, std::string_view path)
|
||||||
{
|
{
|
||||||
|
auto json = nlohmann::json::parse(contents);
|
||||||
|
|
||||||
auto version = json.value("version", 0);
|
auto version = json.value("version", 0);
|
||||||
if (version < 5 || version > 7)
|
if (version < 5 || version > 7)
|
||||||
throw Error("lock file '%s' has unsupported version %d", path, version);
|
throw Error("lock file '%s' has unsupported version %d", path, version);
|
||||||
|
@ -116,11 +118,6 @@ LockFile::LockFile(const nlohmann::json & json, std::string_view path)
|
||||||
// a bit since we don't need to worry about cycles.
|
// a bit since we don't need to worry about cycles.
|
||||||
}
|
}
|
||||||
|
|
||||||
LockFile::LockFile(std::string_view contents, std::string_view path)
|
|
||||||
: LockFile(nlohmann::json::parse(contents), path)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
nlohmann::json LockFile::toJSON() const
|
nlohmann::json LockFile::toJSON() const
|
||||||
{
|
{
|
||||||
nlohmann::json nodes;
|
nlohmann::json nodes;
|
||||||
|
|
|
@ -50,7 +50,6 @@ struct LockFile
|
||||||
std::shared_ptr<Node> root = std::make_shared<Node>();
|
std::shared_ptr<Node> root = std::make_shared<Node>();
|
||||||
|
|
||||||
LockFile() {};
|
LockFile() {};
|
||||||
LockFile(const nlohmann::json & json, std::string_view path);
|
|
||||||
LockFile(std::string_view contents, std::string_view path);
|
LockFile(std::string_view contents, std::string_view path);
|
||||||
|
|
||||||
nlohmann::json toJSON() const;
|
nlohmann::json toJSON() const;
|
||||||
|
|
Loading…
Reference in a new issue