aboutsummaryrefslogtreecommitdiff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 812464d75..00bda1fd1 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -1,12 +1,11 @@
#include "command.hh"
#include "common-args.hh"
-#include "installables.hh"
#include "shared.hh"
#include "store-api.hh"
using namespace nix;
-struct CmdBuild : StoreCommand, MixDryRun, MixInstallables
+struct CmdBuild : MixDryRun, InstallablesCommand
{
CmdBuild()
{
@@ -24,22 +23,9 @@ struct CmdBuild : StoreCommand, MixDryRun, MixInstallables
void run(ref<Store> store) override
{
- auto elems = evalInstallables(store);
+ auto paths = buildInstallables(store, dryRun);
- PathSet pathsToBuild;
-
- for (auto & elem : elems) {
- if (elem.isDrv)
- pathsToBuild.insert(elem.drvPath);
- else
- pathsToBuild.insert(elem.outPaths.begin(), elem.outPaths.end());
- }
-
- printMissing(store, pathsToBuild);
-
- if (dryRun) return;
-
- store->buildPaths(pathsToBuild);
+ printInfo("build result: %s", showPaths(paths));
}
};