about summary refs log tree commit diff
path: root/src/nix/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-25T09·20+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-25T09·20+0200
commitbcecc990071fd36bb88c8fd29cb009ed4c04d6a2 (patch)
treec3f2fa86b2d751418efe7727bc345d0557c3786c /src/nix/build.cc
parent1bb87c0487ba2a10f20c07dfd828b5d043249e31 (diff)
Restructure installables handling in the "nix" command
Diffstat (limited to 'src/nix/build.cc')
-rw-r--r--src/nix/build.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/nix/build.cc b/src/nix/build.cc
index 812464d7582b..0a34c68f8819 100644
--- a/src/nix/build.cc
+++ b/src/nix/build.cc
@@ -6,7 +6,7 @@
 
 using namespace nix;
 
-struct CmdBuild : StoreCommand, MixDryRun, MixInstallables
+struct CmdBuild : MixDryRun, MixInstallables
 {
     CmdBuild()
     {
@@ -24,22 +24,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));
     }
 };