mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
nix flake info: Show flake subdirectory
This commit is contained in:
parent
5f75d56c9b
commit
2287e2f279
8 changed files with 29 additions and 19 deletions
|
@ -16,7 +16,10 @@ const static std::string subDirRegex = subDirElemRegex + "(?:/" + subDirElemRege
|
|||
|
||||
std::string FlakeRef::to_string() const
|
||||
{
|
||||
return input->to_string();
|
||||
auto url = input->toURL();
|
||||
if (subdir != "")
|
||||
url.query.insert_or_assign("dir", subdir);
|
||||
return url.to_string();
|
||||
}
|
||||
|
||||
fetchers::Attrs FlakeRef::toAttrs() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue