Support flake references in the old CLI

Fixes #7026.
This commit is contained in:
Eelco Dolstra
2022-12-12 14:05:52 +01:00
parent ae5f62a894
commit fd0ed75118
5 changed files with 42 additions and 4 deletions
+2 -1
View File
@@ -402,7 +402,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;
}