Implemented --flake flag for nix build

Also fixed Eelco's PR comments
This commit is contained in:
Nick Van den Broeck
2019-03-22 11:16:20 +01:00
parent 6542de98c2
commit d4ee8afd59
8 changed files with 111 additions and 28 deletions
+9 -2
View File
@@ -13,6 +13,7 @@ struct FlakeRegistry
struct Entry
{
FlakeRef ref;
Entry(const FlakeRef & flakeRef) : ref(flakeRef) {};
};
std::map<FlakeId, Entry> entries;
};
@@ -21,9 +22,12 @@ Value * makeFlakeRegistryValue(EvalState & state);
Value * makeFlakeValue(EvalState & state, std::string flakeUri, Value & v);
void writeRegistry(FlakeRegistry, Path);
struct Flake
{
FlakeId id;
FlakeRef ref;
std::string description;
Path path;
std::vector<FlakeRef> requires;
@@ -32,9 +36,12 @@ struct Flake
// commit hash
// date
// content hash
Flake(FlakeRef & flakeRef) : ref(flakeRef) {};
};
Flake getFlake(EvalState & state, const FlakeRef & flakeRef);
Flake getFlake(EvalState &, const FlakeRef &);
void writeRegistry(FlakeRegistry);
FlakeRegistry updateLockFile(EvalState &, Flake &);
void updateLockFile(EvalState &, std::string);
}