![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <derived-path.hh>
Public Types | |
| using | Raw = _SingleDerivedPathRaw |
| using | Opaque = DerivedPathOpaque |
| using | Built = SingleDerivedPathBuilt |
Public Member Functions | |
| const Raw & | raw () const |
| bool | operator== (const SingleDerivedPath &) const =default |
| auto | operator<=> (const SingleDerivedPath &) const =default |
| const StorePath & | getBaseStorePath () const |
| bool | isDynamicDrvOutput () const |
| std::string | to_string (const StoreDirConfig &store) const |
| std::string | to_string_legacy (const StoreDirConfig &store) const |
Static Public Member Functions | |
| static SingleDerivedPath | parse (const StoreDirConfig &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings) |
| static SingleDerivedPath | parseLegacy (const StoreDirConfig &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings) |
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:
| 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.
| bool nix::SingleDerivedPath::isDynamicDrvOutput | ( | ) | const |
Whether this is the output of a dynamic derivation, i.e. a Built whose derivation path is itself Built — more than one layer of DerivedPath::Built.
|
static |
Uses ^ as the separator
| xpSettings | Stop-gap to avoid globals during unit tests. |
|
static |
Uses ! as the separator
| xpSettings | Stop-gap to avoid globals during unit tests. |
| std::string nix::SingleDerivedPath::to_string | ( | const StoreDirConfig & | store | ) | const |
Uses ^ as the separator
| std::string nix::SingleDerivedPath::to_string_legacy | ( | const StoreDirConfig & | store | ) | const |
Uses ! as the separator