mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
InputScheme::fetch(): Return a StorePath instead of a Tree
This commit is contained in:
parent
2d6d9a28eb
commit
aa5b83d93c
8 changed files with 25 additions and 44 deletions
|
@ -180,7 +180,7 @@ struct GitArchiveInputScheme : InputScheme
|
|||
|
||||
virtual DownloadUrl getDownloadUrl(const Input & input) const = 0;
|
||||
|
||||
std::pair<Tree, Input> fetch(ref<Store> store, const Input & _input) override
|
||||
std::pair<StorePath, Input> fetch(ref<Store> store, const Input & _input) override
|
||||
{
|
||||
Input input(_input);
|
||||
|
||||
|
@ -199,10 +199,7 @@ struct GitArchiveInputScheme : InputScheme
|
|||
|
||||
if (auto res = getCache()->lookup(store, immutableAttrs)) {
|
||||
input.attrs.insert_or_assign("lastModified", getIntAttr(res->first, "lastModified"));
|
||||
return {
|
||||
Tree(store->toRealPath(res->second), std::move(res->second)),
|
||||
input
|
||||
};
|
||||
return {std::move(res->second), input};
|
||||
}
|
||||
|
||||
auto url = getDownloadUrl(input);
|
||||
|
@ -221,7 +218,7 @@ struct GitArchiveInputScheme : InputScheme
|
|||
tree.storePath,
|
||||
true);
|
||||
|
||||
return {std::move(tree), input};
|
||||
return {std::move(tree.storePath), input};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue