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:
parent
2d6d9a28eb
commit
aa5b83d93c
8 changed files with 25 additions and 44 deletions
|
@ -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};
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue