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

Classes

struct  ContentAddressed
 
struct  Impure
 
struct  InputAddressed
 

Public Types

typedef std::variant< InputAddressed, ContentAddressed, ImpureRaw
 

Public Member Functions

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

Public Attributes

Raw raw
 

Constructor & Destructor Documentation

◆ DerivationType()

nix::DerivationType::DerivationType ( )
delete

Force choosing a variant

Member Function Documentation

◆ hasKnownOutputPaths()

bool nix::DerivationType::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::DerivationType::isCA ( ) const

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

◆ isFixed()

bool nix::DerivationType::isFixed ( ) const

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

◆ isImpure()

bool nix::DerivationType::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::DerivationType::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: