nix build: Only download the requested derivation outputs

Also some refactoring.
This commit is contained in:
Eelco Dolstra 2017-09-10 15:58:30 +02:00
parent 3ed8290e53
commit ad228d84e5
5 changed files with 52 additions and 18 deletions

View file

@ -118,7 +118,7 @@ void StorePathsCommand::run(ref<Store> store)
}
else {
for (auto & p : toStorePaths(store, NoBuild))
for (auto & p : toStorePaths(store, NoBuild, installables))
storePaths.push_back(p);
if (recursive) {
@ -134,7 +134,7 @@ void StorePathsCommand::run(ref<Store> store)
void StorePathCommand::run(ref<Store> store)
{
auto storePaths = toStorePaths(store, NoBuild);
auto storePaths = toStorePaths(store, NoBuild, installables);
if (storePaths.size() != 1)
throw UsageError("this command requires exactly one store path");