Nix
2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Toggle main menu visibility
Loading...
Searching...
No Matches
repl.hh
Go to the documentation of this file.
1
#pragma once
3
4
#include "
nix/expr/eval.hh
"
5
#include "
nix/util/os-string.hh
"
6
7
namespace
nix {
8
9
struct
AbstractNixRepl
10
{
11
ref<EvalState>
state;
12
const
Bindings
* autoArgs;
13
14
AbstractNixRepl(
ref<EvalState>
state)
15
: state(state)
16
{
17
}
18
19
virtual
~AbstractNixRepl() {}
20
21
typedef
std::vector<std::pair<Value *, std::string>> AnnotatedValues;
22
31
using
RunNix
= void(
const
std::string & programName,
OsStrings
args);
32
38
static
std::unique_ptr<AbstractNixRepl>
create
(
39
const
LookupPath
& lookupPath,
40
ref<EvalState>
state,
41
fun
<AnnotatedValues()> getValues,
42
RunNix
* runNix =
nullptr
);
43
44
static
ReplExitStatus runSimple(
ref<EvalState>
evalState,
const
ValMap & extraEnv);
45
46
virtual
void
initEnv() = 0;
47
48
virtual
ReplExitStatus mainLoop() = 0;
49
};
50
51
}
// namespace nix
nix::Bindings
Definition
attr-set.hh:67
nix::fun
Definition
fun.hh:19
nix::ref
Definition
ref.hh:58
eval.hh
os-string.hh
nix::OsStrings
std::list< OsString > OsStrings
Definition
os-string.hh:51
nix::AbstractNixRepl::RunNix
void(const std::string &programName, OsStrings args) RunNix
Definition
repl.hh:31
nix::AbstractNixRepl::create
static std::unique_ptr< AbstractNixRepl > create(const LookupPath &lookupPath, ref< EvalState > state, fun< AnnotatedValues()> getValues, RunNix *runNix=nullptr)
Definition
repl.cc:962
nix::LookupPath
Definition
search-path.hh:16
libcmd
include
nix
cmd
repl.hh
Generated by
1.18.0