mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Switch comment format from '// ...' to '/* ... */' for consistency.
This commit is contained in:
parent
128c98ab09
commit
887be7b6f2
3 changed files with 57 additions and 53 deletions
|
@ -17,25 +17,26 @@ struct FlakeInput;
|
|||
|
||||
typedef std::map<FlakeId, FlakeInput> FlakeInputs;
|
||||
|
||||
// FlakeInput is the 'Flake'-level parsed form of the "input" entries in
|
||||
// the flake file.
|
||||
//
|
||||
// A FlakeInput is normally constructed by the 'parseFlakeInput'
|
||||
// function which parses the input specification in the '.flake' file
|
||||
// to create a 'FlakeRef' (a fetcher, the fetcher-specific
|
||||
// representation of the input specification, and possibly the fetched
|
||||
// local store path result) and then creating this FlakeInput to hold
|
||||
// that FlakeRef, along with anything that might override that
|
||||
// FlakeRef (like command-line overrides or "follows" specifications).
|
||||
//
|
||||
// A FlakeInput is also sometimes constructed directly from a FlakeRef
|
||||
// instead of starting at the flake-file input specification
|
||||
// (e.g. overrides, follows, and implicit inputs).
|
||||
//
|
||||
// A FlakeInput will usually have one of either "ref" or "follows"
|
||||
// set. If not otherwise specified, a "ref" will be generated to a
|
||||
// 'type="indirect"' flake, which is treated as simply the name of a
|
||||
// flake to be resolved in the registry.
|
||||
/* FlakeInput is the 'Flake'-level parsed form of the "input" entries
|
||||
* in the flake file.
|
||||
*
|
||||
* A FlakeInput is normally constructed by the 'parseFlakeInput'
|
||||
* function which parses the input specification in the '.flake' file
|
||||
* to create a 'FlakeRef' (a fetcher, the fetcher-specific
|
||||
* representation of the input specification, and possibly the fetched
|
||||
* local store path result) and then creating this FlakeInput to hold
|
||||
* that FlakeRef, along with anything that might override that
|
||||
* FlakeRef (like command-line overrides or "follows" specifications).
|
||||
*
|
||||
* A FlakeInput is also sometimes constructed directly from a FlakeRef
|
||||
* instead of starting at the flake-file input specification
|
||||
* (e.g. overrides, follows, and implicit inputs).
|
||||
*
|
||||
* A FlakeInput will usually have one of either "ref" or "follows"
|
||||
* set. If not otherwise specified, a "ref" will be generated to a
|
||||
* 'type="indirect"' flake, which is treated as simply the name of a
|
||||
* flake to be resolved in the registry.
|
||||
*/
|
||||
|
||||
struct FlakeInput
|
||||
{
|
||||
|
|
|
@ -12,32 +12,33 @@ class Store;
|
|||
|
||||
typedef std::string FlakeId;
|
||||
|
||||
// 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 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.
|
||||
/* 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 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.
|
||||
/* 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
|
||||
/* sub-path within the fetched input that represents this input */
|
||||
Path subdir;
|
||||
|
||||
bool operator==(const FlakeRef & other) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue