Public Types | |
using | LookupPathHook = std::optional<SourcePath>(EvalState & state, std::string_view) |
using | LookupPathHooks = std::map<std::string, std::function<LookupPathHook>> |
![]() | |
using | Settings = std::map<std::string, SettingData> |
Public Member Functions | |
EvalSettings (bool &readOnlyMode, LookupPathHooks lookupPathHooks={}) | |
const std::string & | getCurrentSystem () const |
![]() | |
Config (StringMap initials={}) | |
bool | set (const std::string &name, const std::string &value) override |
void | addSetting (AbstractSetting *setting) |
void | getSettings (std::map< std::string, SettingInfo > &res, bool overriddenOnly=false) override |
void | resetOverridden () override |
nlohmann::json | toJSON () override |
std::string | toKeyValue () override |
void | convertToArgs (Args &args, const std::string &category) override |
![]() | |
void | applyConfig (const std::string &contents, const std::string &path="<unknown>") |
void | warnUnknownSettings () |
void | reapplyUnknownSettings () |
Static Public Member Functions | |
static Strings | getDefaultNixPath () |
static bool | isPseudoUrl (std::string_view s) |
static Strings | parseNixPath (const std::string &s) |
static std::string | resolvePseudoUrl (std::string_view url) |
Public Attributes | |
bool & | readOnlyMode |
LookupPathHooks | lookupPathHooks |
Setting< bool > | enableNativeCode |
Setting< Strings > | nixPath |
Setting< std::string > | currentSystem |
Setting< bool > | restrictEval |
Setting< bool > | pureEval |
Setting< bool > | enableImportFromDerivation |
Setting< Strings > | allowedUris |
Setting< bool > | traceFunctionCalls |
Setting< bool > | useEvalCache |
Setting< bool > | ignoreExceptionsDuringTry |
Setting< bool > | traceVerbose |
Setting< unsigned int > | maxCallDepth |
Setting< bool > | builtinsTraceDebugger |
Setting< bool > | builtinsDebuggerOnWarn |
Setting< bool > | builtinsAbortOnWarn |
Additional Inherited Members | |
![]() | |
AbstractConfig (StringMap initials={}) | |
![]() | |
StringMap | unknownSettings |
using nix::EvalSettings::LookupPathHook = std::optional<SourcePath>(EvalState & state, std::string_view) |
Function used to interpet look path entries of a given scheme.
The argument is the non-scheme part of the lookup path entry (see LookupPathHooks
below).
The return value is (a) whether the entry was valid, and, if so, what does it map to.
using nix::EvalSettings::LookupPathHooks = std::map<std::string, std::function<LookupPathHook>> |
Map from "scheme" to a LookupPathHook
.
Given a lookup path value (i.e. either the whole thing, or after the <key>=
) in the form of:
if <scheme>
is a key in this map, then <arbitrary string>
is passed to the hook that is the value in this map.
const std::string & nix::EvalSettings::getCurrentSystem | ( | ) | const |
Implements the eval-system
vs system
defaulting logic described for eval-system
.
Setting<Strings> nix::EvalSettings::allowedUris |
Setting<bool> nix::EvalSettings::builtinsAbortOnWarn |
Setting<bool> nix::EvalSettings::builtinsDebuggerOnWarn |
Setting<bool> nix::EvalSettings::builtinsTraceDebugger |
Setting<std::string> nix::EvalSettings::currentSystem |
Setting<bool> nix::EvalSettings::enableImportFromDerivation |
Setting<bool> nix::EvalSettings::enableNativeCode |
Setting<bool> nix::EvalSettings::ignoreExceptionsDuringTry |
Setting<bool> nix::EvalSettings::pureEval |
Setting<bool> nix::EvalSettings::restrictEval |
Setting<bool> nix::EvalSettings::traceFunctionCalls |
Setting<bool> nix::EvalSettings::traceVerbose |
Setting<bool> nix::EvalSettings::useEvalCache |