mirror of
https://github.com/NixOS/nix
synced 2025-07-04 11:21:47 +02:00
Added nonFlakeRequires and the command nix flake deps
This commit is contained in:
parent
87033f2c4e
commit
18c019b616
4 changed files with 200 additions and 93 deletions
|
@ -38,15 +38,34 @@ struct Flake
|
|||
std::optional<uint64_t> revCount;
|
||||
std::vector<FlakeRef> requires;
|
||||
std::shared_ptr<FlakeRegistry> lockFile;
|
||||
std::map<FlakeId, FlakeRef> nonFlakeRequires;
|
||||
Value * vProvides; // FIXME: gc
|
||||
// commit hash
|
||||
// date
|
||||
// content hash
|
||||
Flake(FlakeRef & flakeRef) : ref(flakeRef) {};
|
||||
Flake(const FlakeRef flakeRef) : ref(flakeRef) {};
|
||||
};
|
||||
|
||||
struct NonFlake
|
||||
{
|
||||
FlakeId id;
|
||||
FlakeRef ref;
|
||||
Path path;
|
||||
// date
|
||||
// content hash
|
||||
NonFlake(const FlakeRef flakeRef) : ref(flakeRef) {};
|
||||
};
|
||||
|
||||
Flake getFlake(EvalState &, const FlakeRef &);
|
||||
|
||||
struct Dependencies
|
||||
{
|
||||
FlakeId topFlakeId;
|
||||
std::vector<Flake> flakes;
|
||||
std::vector<NonFlake> nonFlakes;
|
||||
};
|
||||
|
||||
Dependencies resolveFlake(EvalState &, const FlakeRef &, bool impureTopRef);
|
||||
|
||||
FlakeRegistry updateLockFile(EvalState &, Flake &);
|
||||
|
||||
void updateLockFile(EvalState &, std::string);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue