Slight cleanup
This commit is contained in:
parent
f6d684b5e2
commit
c179f668e5
|
@ -12,8 +12,7 @@
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
/* Read the registry or a lock file. (Currently they have an identical
|
/* Read a registry. */
|
||||||
format. */
|
|
||||||
std::shared_ptr<FlakeRegistry> readRegistry(const Path & path)
|
std::shared_ptr<FlakeRegistry> readRegistry(const Path & path)
|
||||||
{
|
{
|
||||||
auto registry = std::make_shared<FlakeRegistry>();
|
auto registry = std::make_shared<FlakeRegistry>();
|
||||||
|
@ -34,8 +33,8 @@ std::shared_ptr<FlakeRegistry> readRegistry(const Path & path)
|
||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the registry or lock file to a file. */
|
/* Write a registry to a file. */
|
||||||
void writeRegistry(FlakeRegistry registry, Path path)
|
void writeRegistry(const FlakeRegistry & registry, Path path)
|
||||||
{
|
{
|
||||||
nlohmann::json json;
|
nlohmann::json json;
|
||||||
json["version"] = 1;
|
json["version"] = 1;
|
||||||
|
|
|
@ -35,7 +35,7 @@ Value * makeFlakeValue(EvalState & state, const FlakeRef & flakeRef, bool impure
|
||||||
|
|
||||||
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);
|
std::shared_ptr<FlakeRegistry> readRegistry(const Path &);
|
||||||
|
|
||||||
void writeRegistry(FlakeRegistry, Path);
|
void writeRegistry(const FlakeRegistry &, Path);
|
||||||
|
|
||||||
struct Flake
|
struct Flake
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue