#include <derived-path.hh>
Public Types | |
using | Raw = _DerivedPathRaw |
using | Opaque = DerivedPathOpaque |
using | Built = DerivedPathBuilt |
Public Member Functions | |
const Raw & | raw () const |
bool | operator== (const DerivedPath &) const =default |
const StorePath & | getBaseStorePath () const |
std::string | to_string (const StoreDirConfig &store) const |
std::string | to_string_legacy (const StoreDirConfig &store) const |
nlohmann::json | toJSON (Store &store) const |
Static Public Member Functions | |
static DerivedPath | parse (const StoreDirConfig &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings) |
static DerivedPath | parseLegacy (const StoreDirConfig &store, std::string_view, const ExperimentalFeatureSettings &xpSettings=experimentalFeatureSettings) |
static DerivedPath | fromSingle (const SingleDerivedPath &) |
A "derived path" is a very simple sort of expression that evaluates to one or more (concrete) store paths. It is either:
|
static |
Convert a SingleDerivedPath
to a DerivedPath
.
const StorePath & nix::DerivedPath::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.
|
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::DerivedPath::to_string | ( | const StoreDirConfig & | store | ) | const |
Uses ^
as the separator
std::string nix::DerivedPath::to_string_legacy | ( | const StoreDirConfig & | store | ) | const |
Uses !
as the separator