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

#include <derivations.hh>

Classes

struct  CAFixed
 
struct  CAFloating
 
struct  Deferred
 
struct  Impure
 
struct  InputAddressed
 

Public Types

typedef std::variant< InputAddressed, CAFixed, CAFloating, Deferred, ImpureRaw
 

Public Member Functions

bool operator== (const DerivationOutput &) const =default
 
auto operator<=> (const DerivationOutput &) const =default
 
 MAKE_WRAPPER_CONSTRUCTOR (DerivationOutput)
 
 DerivationOutput ()=delete
 
std::optional< StorePathpath (const StoreDirConfig &store, std::string_view drvName, OutputNameView outputName) const
 
nlohmann::json toJSON (const StoreDirConfig &store, std::string_view drvName, OutputNameView outputName) const
 

Static Public Member Functions

static DerivationOutput fromJSON (const StoreDirConfig &store, std::string_view drvName, OutputNameView outputName, const nlohmann::json &json, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)
 

Public Attributes

Raw raw
 

Detailed Description

A single output of a BasicDerivation (and Derivation).

Constructor & Destructor Documentation

◆ DerivationOutput()

nix::DerivationOutput::DerivationOutput ( )
delete

Force choosing a variant

Member Function Documentation

◆ fromJSON()

DerivationOutput nix::DerivationOutput::fromJSON ( const StoreDirConfig & store,
std::string_view drvName,
OutputNameView outputName,
const nlohmann::json & json,
const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings )
static
Parameters
xpSettingsStop-gap to avoid globals during unit tests.

◆ path()

std::optional< StorePath > nix::DerivationOutput::path ( const StoreDirConfig & store,
std::string_view drvName,
OutputNameView outputName ) const
Note
when you use this function you should make sure that you're passing the right derivation name. When in doubt, you should use the safer interface provided by BasicDerivation::outputsAndOptPaths

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