Add "nix search" command
This commit is contained in:
parent
3162ad5ff4
commit
90825dea51
9 changed files with 263 additions and 102 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue