1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

Add some internal documentation for flake support objects.

This commit is contained in:
Kevin Quick 2020-09-26 14:32:58 -07:00
parent 8b4a542d17
commit bd5328814f
No known key found for this signature in database
GPG key ID: E6D7733599CC0A21
3 changed files with 56 additions and 4 deletions

View file

@ -12,10 +12,25 @@ class Store;
typedef std::string FlakeId;
// The FlakeRef represents a local nix store reference to a flake
// input for a Flake (it may be helpful to think of this object by the
// alternate name of "InputRefForFlake"). It is constructed 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 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.
struct FlakeRef
{
// fetcher-specific representation of the input, sufficient to
// perform the fetch operation.
fetchers::Input input;
// sub-path within the fetched input that represents this input
Path subdir;
bool operator==(const FlakeRef & other) const;