diff options
author | regnat <rg@regnat.ovh> | 2021-06-21 15:47:47 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-06-21 15:47:47 +0200 |
commit | 608434722b1f6a25bd4dba6b28e7f7e516c687fb (patch) | |
tree | de87aeadc7dc1819108666a9cfeed65f9d9e8d66 /src/nix | |
parent | db3de0727ec8416e1542f0158d0247a2cbe6e268 (diff) |
Only symlink the requested outputs in `nix build`
Fix #4925
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/build.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index d924fe553..15923ebc3 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -69,8 +69,7 @@ struct CmdBuild : InstallablesCommand, MixDryRun, MixJSON, MixProfile store2->addPermRoot(bo.path, absPath(symlink)); }, [&](BuiltPath::Built bfd) { - auto builtOutputs = store->queryDerivationOutputMap(bfd.drvPath); - for (auto & output : builtOutputs) { + for (auto & output : bfd.outputs) { std::string symlink = outLink; if (i) symlink += fmt("-%d", i); if (output.first != "out") symlink += fmt("-%s", output.first); |