about summary refs log tree commit diff
path: root/src/nix/installables.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-04-25T10·06+0200
committerEelco Dolstra <edolstra@gmail.com>2017-04-25T10·07+0200
commitc769841bc4ecb9dd3d8456931fec78e102c3832f (patch)
treee6723ab7c0c9e2af87181ea787a60bb4a662cfaf /src/nix/installables.cc
parent6267d748891b3c6e6a41b5bd1f6684ae8b88f31c (diff)
Move code around
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r--src/nix/installables.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 70007d62a290..3cf4a6f8d32b 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -1,10 +1,10 @@
+#include "command.hh"
 #include "attr-path.hh"
 #include "common-opts.hh"
 #include "derivations.hh"
 #include "eval-inline.hh"
 #include "eval.hh"
 #include "get-drvs.hh"
-#include "installables.hh"
 #include "store-api.hh"
 #include "shared.hh"
 
@@ -12,7 +12,7 @@
 
 namespace nix {
 
-Value * MixInstallables::getSourceExpr(EvalState & state)
+Value * InstallablesCommand::getSourceExpr(EvalState & state)
 {
     if (vSourceExpr) return vSourceExpr;
 
@@ -89,10 +89,10 @@ struct InstallableStorePath : Installable
 
 struct InstallableExpr : Installable
 {
-    MixInstallables & installables;
+    InstallablesCommand & installables;
     std::string text;
 
-    InstallableExpr(MixInstallables & installables, const std::string & text)
+    InstallableExpr(InstallablesCommand & installables, const std::string & text)
          : installables(installables), text(text) { }
 
     std::string what() override { return text; }
@@ -128,10 +128,10 @@ struct InstallableExpr : Installable
 
 struct InstallableAttrPath : Installable
 {
-    MixInstallables & installables;
+    InstallablesCommand & installables;
     std::string attrPath;
 
-    InstallableAttrPath(MixInstallables & installables, const std::string & attrPath)
+    InstallableAttrPath(InstallablesCommand & installables, const std::string & attrPath)
         : installables(installables), attrPath(attrPath)
     { }
 
@@ -177,7 +177,7 @@ struct InstallableAttrPath : Installable
 std::string attrRegex = R"([A-Za-z_][A-Za-z0-9-_+]*)";
 static std::regex attrPathRegex(fmt(R"(%1%(\.%1%)*)", attrRegex));
 
-std::vector<std::shared_ptr<Installable>> MixInstallables::parseInstallables(ref<Store> store, Strings installables)
+std::vector<std::shared_ptr<Installable>> InstallablesCommand::parseInstallables(ref<Store> store, Strings installables)
 {
     std::vector<std::shared_ptr<Installable>> result;
 
@@ -212,7 +212,7 @@ std::vector<std::shared_ptr<Installable>> MixInstallables::parseInstallables(ref
     return result;
 }
 
-PathSet MixInstallables::buildInstallables(ref<Store> store, bool dryRun)
+PathSet InstallablesCommand::buildInstallables(ref<Store> store, bool dryRun)
 {
     PathSet buildables;
 
@@ -229,14 +229,14 @@ PathSet MixInstallables::buildInstallables(ref<Store> store, bool dryRun)
     return buildables;
 }
 
-ref<EvalState> MixInstallables::getEvalState()
+ref<EvalState> InstallablesCommand::getEvalState()
 {
     if (!evalState)
         evalState = std::make_shared<EvalState>(Strings{}, getStore());
     return ref<EvalState>(evalState);
 }
 
-void MixInstallables::prepare()
+void InstallablesCommand::prepare()
 {
     installables = parseInstallables(getStore(), _installables);
 }