![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <lockfile.hh>
Public Member Functions | |
| const InputAttrPath & | get () const |
| operator const InputAttrPath & () const | |
| const FlakeId & | inputName () const |
| InputAttrPath | parent () const |
| auto | operator<=> (const NonEmptyInputAttrPath &other) const =default |
Static Public Member Functions | |
| static std::optional< NonEmptyInputAttrPath > | parse (std::string_view s) |
| static std::optional< NonEmptyInputAttrPath > | make (InputAttrPath path) |
| static NonEmptyInputAttrPath | append (const InputAttrPath &prefix, const FlakeId &element) |
A non-empty input attribute path.
Input attribute paths identify inputs in a flake. An empty path would refer to the flake itself rather than an input, which contradicts the purpose of operations like override or update.
|
inlinestatic |
Append an element to a path, creating a non-empty path. This is always safe because adding an element guarantees non-emptiness.
|
inline |
Get the final component of the path (the input name). For a path like "a/b/c", returns "c".
|
static |
Construct from an already-parsed path. Returns std::nullopt if the path is empty.
|
inline |
Get the parent path (all components except the last). For a path like "a/b/c", returns "a/b".
|
static |
Parse and validate a non-empty input attribute path. Returns std::nullopt if the path is empty.