Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::AbstractNixRepl Struct Referenceabstract
Inheritance diagram for nix::AbstractNixRepl:
nix::NixRepl

Public Types

typedef std::vector< std::pair< Value *, std::string > > AnnotatedValues
using RunNix = void(const std::string & programName, OsStrings args)

Public Member Functions

 AbstractNixRepl (ref< EvalState > state)
virtual void initEnv ()=0
virtual ReplExitStatus mainLoop ()=0

Static Public Member Functions

static std::unique_ptr< AbstractNixRepl > create (const LookupPath &lookupPath, ref< EvalState > state, fun< AnnotatedValues()> getValues, RunNix *runNix=nullptr)
static ReplExitStatus runSimple (ref< EvalState > evalState, const ValMap &extraEnv)

Public Attributes

ref< EvalState > state
const Bindings * autoArgs

Member Typedef Documentation

◆ RunNix

using nix::AbstractNixRepl::RunNix = void(const std::string & programName, OsStrings args)

Run a nix executable

Todo
this is a layer violation
Parameters
programNameName of the command, e.g. nix or nix-env.
argsarguments to the command.

Member Function Documentation

◆ create()

std::unique_ptr< AbstractNixRepl > nix::AbstractNixRepl::create ( const LookupPath & lookupPath,
ref< EvalState > state,
fun< AnnotatedValues()> getValues,
RunNix * runNix = nullptr )
static
Parameters
runNixFunction to run the nix CLI to support various :<something> commands. Optional; if not provided, everything else will still work fine, but those commands won't.

The documentation for this struct was generated from the following files:
  • libcmd/include/nix/cmd/repl.hh
  • libcmd/repl.cc