about summary refs log tree commit diff
path: root/src/nix/installables.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-07-17T17·02+0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-20T11·33+0200
commit90825dea518ea078f0783a72cc471a5b3716d198 (patch)
treeb6f6fed6e8c7a96a6769344060409f19a56290b9 /src/nix/installables.cc
parent3162ad5ff497b92fc25cd3f397eaff01d67340cc (diff)
Add "nix search" command
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r--src/nix/installables.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 7fad8fe415c6..4da736f4d5c3 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -12,7 +12,7 @@
 
 namespace nix {
 
-Value * InstallablesCommand::getSourceExpr(EvalState & state)
+Value * SourceExprCommand::getSourceExpr(EvalState & state)
 {
     if (vSourceExpr) return vSourceExpr;
 
@@ -59,6 +59,13 @@ Value * InstallablesCommand::getSourceExpr(EvalState & state)
     return vSourceExpr;
 }
 
+ref<EvalState> SourceExprCommand::getEvalState()
+{
+    if (!evalState)
+        evalState = std::make_shared<EvalState>(Strings{}, getStore());
+    return ref<EvalState>(evalState);
+}
+
 struct InstallableStoreDrv : Installable
 {
     Path storePath;
@@ -237,13 +244,6 @@ PathSet InstallablesCommand::toStorePaths(ref<Store> store, ToStorePathsMode mod
     return outPaths;
 }
 
-ref<EvalState> InstallablesCommand::getEvalState()
-{
-    if (!evalState)
-        evalState = std::make_shared<EvalState>(Strings{}, getStore());
-    return ref<EvalState>(evalState);
-}
-
 void InstallablesCommand::prepare()
 {
     installables = parseInstallables(getStore(), _installables);