|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <flakeref.hh>
Public Member Functions | |
| bool | operator== (const FlakeRef &other) const |
| FlakeRef (fetchers::Input &&input, const Path &subdir) | |
| std::string | to_string () const |
| fetchers::Attrs | toAttrs () const |
| kj::Promise< Result< FlakeRef > > | resolve (ref< Store > store) const |
| kj::Promise< Result< std::pair< fetchers::Tree, FlakeRef > > > | fetchTree (ref< Store > store) const |
Static Public Member Functions | |
| static FlakeRef | fromAttrs (const fetchers::Attrs &attrs) |
Public Attributes | |
| fetchers::Input | input |
| Path | subdir |
A flake reference specifies how to fetch a flake or raw source (e.g. from a Git repository). It is created from a URL-like syntax (e.g. 'github:NixOS/patchelf'), an attrset representation (e.g. '{ type="github"; owner = "NixOS"; repo = "patchelf"; }'), or a local path.
Each flake will have a number of FlakeRef objects: one for each input to the flake.
The normal method of constructing a FlakeRef is by starting with an input description (usually the attrs or a url from the flake file), locating a fetcher for that input, and then capturing the Input object that fetcher generates (usually via FlakeRef::fromAttrs(attrs) or parseFlakeRef(url) calls).
The actual fetch may not have been performed yet (i.e. a FlakeRef may be lazy), but the fetcher can be invoked at any time via the FlakeRef to ensure the store is populated with this input.
| fetchers::Input nix::FlakeRef::input |
Fetcher-specific representation of the input, sufficient to perform the fetch operation.
| Path nix::FlakeRef::subdir |
sub-path within the fetched input that represents this input