1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

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

Backported from lazy-trees.
This commit is contained in:
Eelco Dolstra 2025-01-09 12:17:09 +01:00
parent 28caa35a97
commit 83ff523865

View file

@ -183,11 +183,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);
} }
/** /**