1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 14:53:16 +02:00

parsePathFlakeRefWithFragment(): Handle query params in the non-git case

Backported from lazy-trees.

(cherry picked from commit 83ff523865)
This commit is contained in:
Eelco Dolstra 2025-01-09 12:17:09 +01:00
parent faecb6e306
commit 31fa189123

View file

@ -182,11 +182,13 @@ std::pair<FlakeRef, std::string> parsePathFlakeRefWithFragment(
path = canonPath(path + "/" + getOr(query, "dir", "")); path = canonPath(path + "/" + getOr(query, "dir", ""));
} }
fetchers::Attrs attrs; return fromParsedURL(fetchSettings, {
attrs.insert_or_assign("type", "path"); .scheme = "path",
attrs.insert_or_assign("path", path); .authority = "",
.path = path,
return std::make_pair(FlakeRef(fetchers::Input::fromAttrs(fetchSettings, std::move(attrs)), ""), fragment); .query = query,
.fragment = fragment
}, isFlake);
} }
/** /**