Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::derivation::Type Struct Reference

Classes

struct  InputAddressed
struct  ContentAddressed
struct  Impure

Public Types

typedef std::variant< InputAddressed, ContentAddressed, Impure > Raw

Public Member Functions

bool operator== (const Type &) const =default
auto operator<=> (const Type &) const =default
 MAKE_WRAPPER_CONSTRUCTOR (Type)
 Type ()=delete
bool isCA () const
bool isFixed () const
bool isSandboxed () const
bool isImpure () const
bool hasKnownOutputPaths () const

Public Attributes

Raw raw

Constructor & Destructor Documentation

◆ Type()

nix::derivation::Type::Type ( )
delete

Force choosing a variant

Member Function Documentation

◆ hasKnownOutputPaths()

bool nix::derivation::Type::hasKnownOutputPaths ( ) const

Does the derivation knows its own output paths? Only true when there's no floating-ca derivation involved in the closure, or if fixed output.

◆ isCA()

bool nix::derivation::Type::isCA ( ) const

Do the outputs of the derivation have paths calculated from their content, or from the derivation itself?

◆ isFixed()

bool nix::derivation::Type::isFixed ( ) const

Is the content of the outputs fixed a priori via a hash? Never true for non-CA derivations.

◆ isImpure()

bool nix::derivation::Type::isImpure ( ) const

Whether the derivation is expected to produce a different result every time, and therefore it needs to be rebuilt every time. This is only true for derivations that have the attribute '__impure = true'.

Non-impure derivations can still behave impurely, to the degree permitted by the sandbox. Hence why this method isn't isPure: impure derivations are not the negation of pure derivations. Purity can not be ascertained except by rather heavy tools.

◆ isSandboxed()

bool nix::derivation::Type::isSandboxed ( ) const

Whether the derivation is fully sandboxed. If false, the sandbox is opened up, e.g. the derivation has access to the network. Note that whether or not we actually sandbox the derivation is controlled separately. Always true for non-CA derivations.


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