StorePathCommands: Build installables
So for instance "nix copy --to ... nixpkgs.hello" will build nixpkgs.hello first. It's debatable whether this is a good idea. It seems desirable for commands like "nix copy" but maybe not for commands like "nix path-info".
This commit is contained in:
parent
d48c973ece
commit
c30330df6f
3 changed files with 13 additions and 20 deletions
|
|
@ -228,7 +228,16 @@ PathSet InstallablesCommand::buildInstallables(ref<Store> store, bool dryRun)
|
|||
if (!dryRun)
|
||||
store->buildPaths(buildables);
|
||||
|
||||
return buildables;
|
||||
PathSet outPaths;
|
||||
for (auto & path : buildables)
|
||||
if (isDerivation(path)) {
|
||||
Derivation drv = store->derivationFromPath(path);
|
||||
for (auto & output : drv.outputs)
|
||||
outPaths.insert(output.second.path);
|
||||
} else
|
||||
outPaths.insert(path);
|
||||
|
||||
return outPaths;
|
||||
}
|
||||
|
||||
ref<EvalState> InstallablesCommand::getEvalState()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue