diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-01-28 13:16:19 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-01-28 13:16:19 +0100 |
commit | 6be04476dc076fc1f054d9b905616bfb65c9ff75 (patch) | |
tree | 92534aaefe86ad229ae57f7c33ff70e71e4fb8d9 | |
parent | 1af7b94c1d4655e8d10529c257ce044294c33137 (diff) |
Shut up warning
-rw-r--r-- | src/nix/installables.cc | 5 |
1 files changed, 1 insertions, 4 deletions
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<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables( }; for (auto & s : ss) { - - size_t hash; - std::optional<StorePath> storePath; - if (hasPrefix(s, "nixpkgs.")) { bool static warned; warnOnce(warned, "the syntax 'nixpkgs.<attr>' is deprecated; use 'nixpkgs:<attr>' instead"); @@ -454,6 +450,7 @@ std::vector<std::shared_ptr<Installable>> SourceExprCommand::parseInstallables( fragment == "" ? getDefaultFlakeAttrPaths() : Strings{fragment}, getDefaultFlakeAttrPathPrefixes())); } else { + std::optional<StorePath> storePath; if (s.find('/') != std::string::npos && (storePath = follow(s))) result.push_back(std::make_shared<InstallableStorePath>(store, store->printStorePath(*storePath))); else |