Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::derivation::Options< Input > Struct Template Reference

Public Member Functions

bool operator== (const Options &) const =default
template<typename Inputs>
StringSet getRequiredSystemFeatures (const Derivation< Inputs, Output > &drv) const
bool substitutesAllowed (const WorkerSettings &workerSettings) const
template<typename Inputs>
bool useUidRange (const Derivation< Inputs, Output > &drv) const

Public Attributes

std::variant< derivation::OutputChecks< Input >, std::map< std::string, derivation::OutputChecks< Input >, std::less<> > > outputChecks = derivation::OutputChecks<Input>{}
std::map< std::string, bool, std::less<> > unsafeDiscardReferences
StringSet passAsFile
std::string additionalSandboxProfile = ""
bool noChroot = false
StringSet impureHostDeps = {}
StringSet impureEnvVars = {}
bool allowLocalNetworking = false
StringSet requiredSystemFeatures = {}
bool preferLocalBuild = false
bool allowSubstitutes = true

Member Function Documentation

◆ getRequiredSystemFeatures()

template<typename Input>
template<typename Inputs>
template StringSet nix::derivation::Options< Input >::getRequiredSystemFeatures ( const Derivation< Inputs, Output > & drv) const
Parameters
drvMust be the same derivation we parsed this from. In the future we'll flip things around so a BasicDerivation has DerivationOptions instead.

◆ useUidRange()

template<typename Input>
template<typename Inputs>
template bool nix::derivation::Options< Input >::useUidRange ( const Derivation< Inputs, Output > & drv) const
Parameters
drvSee note on getRequiredSystemFeatures

Member Data Documentation

◆ additionalSandboxProfile

template<typename Input>
std::string nix::derivation::Options< Input >::additionalSandboxProfile = ""

The `exportReferencesGraph' feature allows the references graph to be passed to a builder

Legacy case

Given a name pathSet key-value pair, the references graph of pathSet will be stored in a text file name' in the temporary build directory. The text files have the format used by nix-store –register-validity'. However, the deriver fields are left empty.

"Structured attributes" case

The same information will be put put in the final structured attributes give to the builder. The set of paths in the original JSON is replaced with a list of PathInfo in JSON format. */ std::map<std::string, std::set<Input>, std::less<>> exportReferencesGraph;

/** env: __sandboxProfile

Just for Darwin

◆ allowLocalNetworking

template<typename Input>
bool nix::derivation::Options< Input >::allowLocalNetworking = false

env: __darwinAllowLocalNetworking

Just for Darwin

◆ allowSubstitutes

template<typename Input>
bool nix::derivation::Options< Input >::allowSubstitutes = true

env: allowSubstitutes

◆ impureEnvVars

template<typename Input>
StringSet nix::derivation::Options< Input >::impureEnvVars = {}

env: impureEnvVars

◆ impureHostDeps

template<typename Input>
StringSet nix::derivation::Options< Input >::impureHostDeps = {}

env: __impureHostDeps

◆ noChroot

template<typename Input>
bool nix::derivation::Options< Input >::noChroot = false

env: __noChroot

Derivation would like to opt out of the sandbox.

Builder is free to not respect this wish (because it is insecure) and fail the build instead.

◆ outputChecks

template<typename Input>
std::variant<derivation::OutputChecks<Input>, std::map<std::string, derivation::OutputChecks<Input>, std::less<> > > nix::derivation::Options< Input >::outputChecks = derivation::OutputChecks<Input>{}

Either one set of checks for all outputs, or separate checks per-output.

◆ passAsFile

template<typename Input>
StringSet nix::derivation::Options< Input >::passAsFile

In non-structured mode, all bindings specified in the derivation go directly via the environment, except those listed in the passAsFile attribute. Those are instead passed as file names pointing to temporary files containing the contents.

Note that passAsFile is ignored in structure mode because it's not needed (attributes are not passed through the environment, so there is no size constraint).

◆ preferLocalBuild

template<typename Input>
bool nix::derivation::Options< Input >::preferLocalBuild = false

env: preferLocalBuild

◆ requiredSystemFeatures

template<typename Input>
StringSet nix::derivation::Options< Input >::requiredSystemFeatures = {}

env: requiredSystemFeatures

◆ unsafeDiscardReferences

template<typename Input>
std::map<std::string, bool, std::less<> > nix::derivation::Options< Input >::unsafeDiscardReferences

Whether to avoid scanning for references for a given output.


The documentation for this struct was generated from the following files: