For nixpkgs.<attr>, use legacyPackages

This makes commands like 'nix run nixpkgs.chromium' work again.
This commit is contained in:
Eelco Dolstra 2019-06-13 14:07:25 +02:00
parent 06010eaf19
commit 415fc233e3
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -411,7 +411,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables(
bool static warned;
warnOnce(warned, "the syntax 'nixpkgs.<attr>' is deprecated; use 'nixpkgs:<attr>' instead");
result.push_back(std::make_shared<InstallableFlake>(*this, FlakeRef("nixpkgs"),
Strings{"packages." + std::string(s, 8)}));
Strings{"legacyPackages." + std::string(s, 8)}));
}
else if (auto flakeRef = parseFlakeRef(s, true))