nix-shell: Only download requested outputs

Fixes #2116.
This commit is contained in:
Eelco Dolstra 2018-05-07 14:58:25 +02:00
parent f02eadfda5
commit a1adcdf087
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -354,7 +354,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);