1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

nix-shell: Only download requested outputs

Fixes #2116.

(cherry picked from commit a1adcdf087)
This commit is contained in:
Eelco Dolstra 2018-05-07 14:58:25 +02:00
parent cf2a751a93
commit 47c42cd5d8
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -350,7 +350,7 @@ void mainWrapped(int argc, char * * argv)
// Build or fetch all dependencies of the derivation. // Build or fetch all dependencies of the derivation.
for (const auto & input : drv.inputDrvs) 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)); })) 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) for (const auto & src : drv.inputSrcs)
pathsToBuild.insert(src); pathsToBuild.insert(src);