diff options
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r-- | src/nix/build.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc index 4239dd3ff..64bcafd2d 100644 --- a/src/nix/build.cc +++ b/src/nix/build.cc @@ -23,9 +23,20 @@ struct CmdBuild : MixDryRun, InstallablesCommand void run(ref<Store> store) override { - auto paths = toStorePaths(store, dryRun ? DryRun : Build); + auto buildables = toBuildables(store, dryRun ? DryRun : Build); - printError("build result: %s", showPaths(paths)); + for (size_t i = 0; i < buildables.size(); ++i) { + auto & b(buildables[i]); + + for (auto & output : b.outputs) { + if (auto store2 = store.dynamic_pointer_cast<LocalFSStore>()) { + std::string symlink = "result"; + if (i) symlink += fmt("-%d", i); + if (output.first != "out") symlink += fmt("-%s", output.first); + store2->addPermRoot(output.second, absPath(symlink), true); + } + } + } } }; |