Fix nixpkgs.<attr> warning

This commit is contained in:
Eelco Dolstra 2020-02-19 00:09:42 +01:00
parent 50cf77cecd
commit 95468e3c1e

View file

@ -454,7 +454,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables(
for (auto & s : ss) {
if (hasPrefix(s, "nixpkgs.")) {
bool static warned;
warnOnce(warned, "the syntax 'nixpkgs.<attr>' is deprecated; use 'nixpkgs:<attr>' instead");
warnOnce(warned, "the syntax 'nixpkgs.<attr>' is deprecated; use 'nixpkgs#<attr>' instead");
result.push_back(std::make_shared<InstallableFlake>(*this,
FlakeRef::fromAttrs({{"type", "indirect"}, {"id", "nixpkgs"}}),
Strings{"legacyPackages." + settings.thisSystem.get() + "." + std::string(s, 8)}, Strings{}));