Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
repl.hh
Go to the documentation of this file.
1#pragma once
3
4#include "lix/libexpr/eval.hh"
6
7namespace nix {
8
9struct AbstractNixRepl : NeverAsync
10{
11 typedef std::vector<std::pair<Value*,std::string>> AnnotatedValues;
12
13 static ReplExitStatus
14 run(const SearchPath & searchPath,
15 nix::ref<Store> store,
16 EvalState & state,
17 std::function<AnnotatedValues()> getValues,
18 const ValMap & extraEnv,
19 Bindings * autoArgs);
20
21 static ReplExitStatus runSimple(
22 EvalState & evalState,
23 const ValMap & extraEnv);
24
25protected:
26 EvalState & state;
27 Bindings * autoArgs;
28
29 AbstractNixRepl(EvalState & state)
30 : state(state)
31 { }
32
33 virtual ~AbstractNixRepl()
34 { }
35
36 virtual void initEnv() = 0;
37
38 virtual ReplExitStatus mainLoop() = 0;
39};
40
41}
Definition attr-set.hh:48
Definition eval.hh:685
Definition ref.hh:19
ReplExitStatus
Definition repl-exit-status.hh:9
Definition types.hh:172
Definition search-path.hh:16