Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
nix::SingleDerivedPath Struct Reference

#include <derived-path.hh>

Inheritance diagram for nix::SingleDerivedPath:

Public Types

using Raw = derived_path::detail::SingleDerivedPathRaw
using Opaque = DerivedPathOpaque
using Built = SingleDerivedPathBuilt

Public Member Functions

const Raw & raw () const
const StorePathgetBaseStorePath () const
std::string to_string (const Store &store) const
std::string to_string_legacy (const Store &store) const
kj::Promise< Result< JSON > > toJSON (Store &store) const

Static Public Member Functions

static SingleDerivedPath parse (const Store &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)
static SingleDerivedPath parseLegacy (const Store &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings)

Detailed Description

A "derived path" is a very simple sort of expression (not a Nix language expression! But an expression in a the general sense) that evaluates to (concrete) store path. It is either:

  • opaque, in which case it is just a concrete store path with possibly no known derivation
  • built, in which case it is a pair of a derivation path and an output name.

Member Function Documentation

◆ getBaseStorePath()

const StorePath & nix::SingleDerivedPath::getBaseStorePath ( ) const

Get the store path this is ultimately derived from (by realising and projecting outputs).

Note that this is not a property of the store object being referred to, but just of this path — how we happened to be referring to that store object. In other words, this means this function breaks "referential transparency". It should therefore be used only with great care.

◆ parse()

SingleDerivedPath nix::SingleDerivedPath::parse ( const Store & store,
std::string_view s,
const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings )
static

Uses ^ as the separator

Parameters
xpSettingsStop-gap to avoid globals during unit tests.

◆ parseLegacy()

SingleDerivedPath nix::SingleDerivedPath::parseLegacy ( const Store & store,
std::string_view s,
const ExperimentalFeatureSettings & xpSettings = experimentalFeatureSettings )
static

Uses ! as the separator

Parameters
xpSettingsStop-gap to avoid globals during unit tests.

◆ to_string()

std::string nix::SingleDerivedPath::to_string ( const Store & store) const

Uses ^ as the separator

◆ to_string_legacy()

std::string nix::SingleDerivedPath::to_string_legacy ( const Store & store) const

Uses ! as the separator


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