mirror of
https://github.com/NixOS/nix
synced 2025-07-01 12:37:59 +02:00
Trivial changes from the lazy-trees branch
This commit is contained in:
parent
c4a6113800
commit
703d863a48
62 changed files with 394 additions and 248 deletions
|
@ -20,7 +20,7 @@ struct LockedNode;
|
|||
type LockedNode. */
|
||||
struct Node : std::enable_shared_from_this<Node>
|
||||
{
|
||||
typedef std::variant<std::shared_ptr<LockedNode>, InputPath> Edge;
|
||||
typedef std::variant<ref<LockedNode>, InputPath> Edge;
|
||||
|
||||
std::map<FlakeId, Edge> inputs;
|
||||
|
||||
|
@ -47,11 +47,13 @@ struct LockedNode : Node
|
|||
|
||||
struct LockFile
|
||||
{
|
||||
std::shared_ptr<Node> root = std::make_shared<Node>();
|
||||
ref<Node> root = make_ref<Node>();
|
||||
|
||||
LockFile() {};
|
||||
LockFile(const nlohmann::json & json, const Path & path);
|
||||
|
||||
typedef std::map<ref<const Node>, std::string> KeyMap;
|
||||
|
||||
nlohmann::json toJSON() const;
|
||||
|
||||
std::string to_string() const;
|
||||
|
@ -60,7 +62,8 @@ struct LockFile
|
|||
|
||||
void write(const Path & path) const;
|
||||
|
||||
bool isImmutable() const;
|
||||
/* Check whether this lock file has any unlocked inputs. */
|
||||
std::optional<FlakeRef> isUnlocked() const;
|
||||
|
||||
bool operator ==(const LockFile & other) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue