|
Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
|
#include <fetchers.hh>
Public Member Functions | |
| ParsedURL | toURL () const |
| std::string | toURLString (const std::map< std::string, std::string > &extraQuery={}) const |
| std::string | to_string () const |
| Attrs | toAttrs () const |
| bool | isDirect () const |
| bool | isLocked () const |
| bool | hasAllInfo () const |
| bool | operator== (const Input &other) const |
| bool | contains (const Input &other) const |
| kj::Promise< Result< std::pair< Tree, Input > > > | fetch (ref< Store > store) const |
| Input | applyOverrides (std::optional< std::string > ref, std::optional< Hash > rev) const |
| void | clone (const Path &destDir) const |
| std::optional< Path > | getSourcePath () const |
| void | putFile (const CanonPath &path, std::string_view contents, std::optional< std::string > commitMsg) const |
| std::string | getName () const |
| StorePath | computeStorePath (Store &store) const |
| std::string | getType () const |
| std::optional< Hash > | getNarHash () const |
| std::optional< std::string > | getRef () const |
| std::optional< Hash > | getRev () const |
| std::optional< uint64_t > | getRevCount () const |
| std::optional< time_t > | getLastModified () const |
Static Public Member Functions | |
| static Input | fromURL (const std::string &url, bool requireTree=true) |
| static Input | fromURL (const ParsedURL &url, bool requireTree=true) |
| static Input | fromAttrs (Attrs &&attrs) |
Public Attributes | |
| std::shared_ptr< InputScheme > | scheme |
| Attrs | attrs |
| bool | locked = false |
| bool | direct = true |
| std::optional< Path > | parent |
Friends | |
| struct | InputScheme |
The Input object is generated by a specific fetcher, based on the user-supplied input attribute in the flake.nix file, and contains the information that the specific fetcher needs to perform the actual fetch. The Input object is most commonly created via the "fromURL()" or "fromAttrs()" static functions which are provided the url or attrset specified in the flake file.
| kj::Promise< Result< std::pair< Tree, Input > > > nix::fetchers::Input::fetch | ( | ref< Store > | store | ) | const |
Fetch the input into the Nix store, returning the location in the Nix store and the locked input.
| bool nix::fetchers::Input::hasAllInfo | ( | ) | const |
Check whether the input carries all necessary info required for cache insertion and substitution. These fields are used to uniquely identify cached trees within the "tarball TTL" window without necessarily indicating that the input's origin is unchanged.
|
inline |
Check whether this is a "direct" input, that is, not one that goes through a registry.
|
inline |
Check whether this is a "locked" input, that is, one that contains a commit hash or content hash.
| void nix::fetchers::Input::putFile | ( | const CanonPath & | path, |
| std::string_view | contents, | ||
| std::optional< std::string > | commitMsg ) const |
Write a file to this input, for input types that support writing. Optionally commit the change (for e.g. Git inputs).
| std::optional<Path> nix::fetchers::Input::parent |
path of the parent of this input, used for relative path resolution