1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-03 02:01:48 +02:00

InputScheme::fetch(): Return a StorePath instead of a Tree

This commit is contained in:
Eelco Dolstra 2022-02-15 14:33:31 +01:00
parent 2d6d9a28eb
commit aa5b83d93c
8 changed files with 25 additions and 44 deletions

View file

@ -80,7 +80,7 @@ struct PathInputScheme : InputScheme
// nothing to do
}
std::pair<Tree, Input> fetch(ref<Store> store, const Input & input) override
std::pair<StorePath, Input> fetch(ref<Store> store, const Input & input) override
{
std::string absPath;
auto path = getStrAttr(input.attrs, "path");
@ -115,10 +115,7 @@ struct PathInputScheme : InputScheme
// FIXME: try to substitute storePath.
storePath = store->addToStore("source", absPath);
return {
Tree(store->toRealPath(*storePath), std::move(*storePath)),
input
};
return {std::move(*storePath), input};
}
};