diff --git a/src/nix/installables.cc b/src/nix/installables.cc index 85b090bfc..8e4b53308 100644 --- a/src/nix/installables.cc +++ b/src/nix/installables.cc @@ -434,10 +434,6 @@ std::vector> SourceExprCommand::parseInstallables( }; for (auto & s : ss) { - - size_t hash; - std::optional storePath; - if (hasPrefix(s, "nixpkgs.")) { bool static warned; warnOnce(warned, "the syntax 'nixpkgs.' is deprecated; use 'nixpkgs:' instead"); @@ -454,6 +450,7 @@ std::vector> SourceExprCommand::parseInstallables( fragment == "" ? getDefaultFlakeAttrPaths() : Strings{fragment}, getDefaultFlakeAttrPathPrefixes())); } else { + std::optional storePath; if (s.find('/') != std::string::npos && (storePath = follow(s))) result.push_back(std::make_shared(store, store->printStorePath(*storePath))); else