mirror of
https://github.com/NixOS/nix
synced 2025-06-27 21:01:16 +02:00
resolveLookupPathPath(): Return a SourcePath instead of a string
Cherry-picked from lazy-trees.
This commit is contained in:
parent
3b76d01f3b
commit
af07f33d37
5 changed files with 21 additions and 24 deletions
|
@ -29,13 +29,13 @@ EvalSettings evalSettings {
|
|||
{
|
||||
{
|
||||
"flake",
|
||||
[](ref<Store> store, std::string_view rest) {
|
||||
[](EvalState & state, std::string_view rest) {
|
||||
experimentalFeatureSettings.require(Xp::Flakes);
|
||||
// FIXME `parseFlakeRef` should take a `std::string_view`.
|
||||
auto flakeRef = parseFlakeRef(fetchSettings, std::string { rest }, {}, true, false);
|
||||
debug("fetching flake search path element '%s''", rest);
|
||||
auto storePath = flakeRef.resolve(store).fetchTree(store).first;
|
||||
return store->toRealPath(storePath);
|
||||
auto storePath = flakeRef.resolve(state.store).fetchTree(state.store).first;
|
||||
return state.rootPath(state.store->toRealPath(storePath));
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue