1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00
This commit is contained in:
Eelco Dolstra 2020-02-02 11:31:58 +01:00
parent b270869466
commit 958ec5de56
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
6 changed files with 19 additions and 29 deletions

View file

@ -27,16 +27,6 @@ fetchers::Input::Attrs FlakeRef::toAttrs() const
return attrs;
}
bool FlakeRef::isDirect() const
{
return input->isDirect();
}
bool FlakeRef::isImmutable() const
{
return input->isImmutable();
}
std::ostream & operator << (std::ostream & str, const FlakeRef & flakeRef)
{
str << flakeRef.to_string();
@ -182,4 +172,10 @@ FlakeRef FlakeRef::fromAttrs(const fetchers::Input::Attrs & attrs)
fetchers::maybeGetStrAttr(attrs, "subdir").value_or(""));
}
std::pair<fetchers::Tree, FlakeRef> FlakeRef::fetchTree(ref<Store> store) const
{
auto [tree, lockedInput] = input->fetchTree(store);
return {std::move(tree), FlakeRef(lockedInput, subdir)};
}
}