installables: fix nix-dram parsing

This commit is contained in:
Max Headroom 2023-01-22 03:08:09 +01:00
parent 8909f06cae
commit 9df3607c72

View file

@ -1009,11 +1009,13 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables(
}
try {
bool isAttrPath = std::regex_match(s, attrPathRegex);
auto prefixS = std::string { prefix };
auto actualRef = isAttrPath ? "flake:default#" + s : s;
bool isAttrPath = std::regex_match(prefixS, attrPathRegex);
auto [flakeRef, fragment] = parseFlakeRefWithFragment(std::string { prefix }, absPath("."));
auto actualRef = isAttrPath ? "flake:default#" + prefixS : prefixS;
auto [flakeRef, fragment] = parseFlakeRefWithFragment(actualRef, absPath("."));
auto state = getEvalState();