Skip to content

Commit

Permalink
nix-shell: Only download requested outputs
Browse files Browse the repository at this point in the history
Fixes NixOS#2116.

(cherry picked from commit a1adcdf)
  • Loading branch information
edolstra committed May 29, 2018
1 parent cf2a751 commit 47c42cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nix-build/nix-build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void mainWrapped(int argc, char * * argv)
// Build or fetch all dependencies of the derivation.
for (const auto & input : drv.inputDrvs)
if (std::all_of(envExclude.cbegin(), envExclude.cend(), [&](const string & exclude) { return !std::regex_search(input.first, std::regex(exclude)); }))
pathsToBuild.insert(input.first);
pathsToBuild.insert(makeDrvPathWithOutputs(input.first, input.second));
for (const auto & src : drv.inputSrcs)
pathsToBuild.insert(src);

Expand Down

0 comments on commit 47c42cd

Please sign in to comment.