1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 10:31:15 +02:00

Support flake references in the old CLI

Fixes #7026.
This commit is contained in:
Eelco Dolstra 2022-09-13 19:05:05 +02:00
parent 432a3a18d2
commit 2a1c63c785
6 changed files with 113 additions and 44 deletions

View file

@ -405,7 +405,8 @@ static Strings parseNixPath(const std::string & s)
}
if (*p == ':') {
if (EvalSettings::isPseudoUrl(std::string(start2, s.end()))) {
auto prefix = std::string(start2, s.end());
if (EvalSettings::isPseudoUrl(prefix) || hasPrefix(prefix, "flake:")) {
++p;
while (p != s.end() && *p != ':') ++p;
}