This commit is contained in:
Eelco Dolstra
2020-02-02 11:31:58 +01:00
parent b270869466
commit 958ec5de56
6 changed files with 19 additions and 29 deletions
+6 -10
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)};
}
}