mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
parsePathFlakeRefWithFragment(): Handle query params in the non-git case
Backported from lazy-trees.
This commit is contained in:
parent
28caa35a97
commit
83ff523865
1 changed files with 7 additions and 5 deletions
|
@ -183,11 +183,13 @@ std::pair<FlakeRef, std::string> parsePathFlakeRefWithFragment(
|
|||
path = canonPath(path + "/" + getOr(query, "dir", ""));
|
||||
}
|
||||
|
||||
fetchers::Attrs attrs;
|
||||
attrs.insert_or_assign("type", "path");
|
||||
attrs.insert_or_assign("path", path);
|
||||
|
||||
return std::make_pair(FlakeRef(fetchers::Input::fromAttrs(fetchSettings, std::move(attrs)), ""), fragment);
|
||||
return fromParsedURL(fetchSettings, {
|
||||
.scheme = "path",
|
||||
.authority = "",
|
||||
.path = path,
|
||||
.query = query,
|
||||
.fragment = fragment
|
||||
}, isFlake);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue