#pragma once ///@file #include "eval.hh" namespace nix { struct AbstractNixRepl { ref state; Bindings * autoArgs; AbstractNixRepl(ref state) : state(state) { } virtual ~AbstractNixRepl() { } typedef std::vector> AnnotatedValues; using RunNix = void(Path program, const Strings & args, const std::optional & input); /** * @param runNix Function to run the nix CLI to support various * `:` commands. Optional; if not provided, * everything else will still work fine, but those commands won't. */ static std::unique_ptr create( const LookupPath & lookupPath, nix::ref store, ref state, std::function getValues, RunNix * runNix = nullptr); static ReplExitStatus runSimple( ref evalState, const ValMap & extraEnv); virtual void initEnv() = 0; virtual ReplExitStatus mainLoop() = 0; }; }