aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers')
-rw-r--r--src/libfetchers/attrs.hh1
-rw-r--r--src/libfetchers/cache.hh1
-rw-r--r--src/libfetchers/fetch-settings.hh1
-rw-r--r--src/libfetchers/fetchers.hh42
-rw-r--r--src/libfetchers/registry.hh1
5 files changed, 31 insertions, 15 deletions
diff --git a/src/libfetchers/attrs.hh b/src/libfetchers/attrs.hh
index e41037633..1a14bb023 100644
--- a/src/libfetchers/attrs.hh
+++ b/src/libfetchers/attrs.hh
@@ -1,4 +1,5 @@
#pragma once
+///@file
#include "types.hh"
diff --git a/src/libfetchers/cache.hh b/src/libfetchers/cache.hh
index 3763ee2a6..ae398d040 100644
--- a/src/libfetchers/cache.hh
+++ b/src/libfetchers/cache.hh
@@ -1,4 +1,5 @@
#pragma once
+///@file
#include "fetchers.hh"
diff --git a/src/libfetchers/fetch-settings.hh b/src/libfetchers/fetch-settings.hh
index 4bc2d0e1a..6108a179c 100644
--- a/src/libfetchers/fetch-settings.hh
+++ b/src/libfetchers/fetch-settings.hh
@@ -1,4 +1,5 @@
#pragma once
+///@file
#include "types.hh"
#include "config.hh"
diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh
index 95c0f5974..498ad7e4d 100644
--- a/src/libfetchers/fetchers.hh
+++ b/src/libfetchers/fetchers.hh
@@ -1,4 +1,5 @@
#pragma once
+///@file
#include "types.hh"
#include "hash.hh"
@@ -20,14 +21,14 @@ struct Tree
struct InputScheme;
-/* The Input object is generated by a specific fetcher, based on the
+/**
+ * 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.
*/
-
struct Input
{
friend struct InputScheme;
@@ -37,7 +38,9 @@ struct Input
bool locked = false;
bool direct = true;
- /* path of the parent of this input, used for relative path resolution */
+ /**
+ * path of the parent of this input, used for relative path resolution
+ */
std::optional<Path> parent;
public:
@@ -55,27 +58,35 @@ public:
Attrs toAttrs() const;
- /* Check whether this is a "direct" input, that is, not
- one that goes through a registry. */
+ /**
+ * Check whether this is a "direct" input, that is, not
+ * one that goes through a registry.
+ */
bool isDirect() const { return direct; }
- /* Check whether this is a "locked" input, that is,
- one that contains a commit hash or content hash. */
+ /**
+ * Check whether this is a "locked" input, that is,
+ * one that contains a commit hash or content hash.
+ */
bool isLocked() const { return locked; }
- /* 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. */
+ /**
+ * 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.
+ */
bool hasAllInfo() const;
bool operator ==(const Input & other) const;
bool contains(const Input & other) const;
- /* Fetch the input into the Nix store, returning the location in
- the Nix store and the locked input. */
+ /**
+ * Fetch the input into the Nix store, returning the location in
+ * the Nix store and the locked input.
+ */
std::pair<Tree, Input> fetch(ref<Store> store) const;
Input applyOverrides(
@@ -104,7 +115,8 @@ public:
};
-/* The InputScheme represents a type of fetcher. Each fetcher
+/**
+ * The InputScheme represents a type of fetcher. Each fetcher
* registers with nix at startup time. When processing an input for a
* flake, each scheme is given an opportunity to "recognize" that
* input from the url or attributes in the flake file's specification
diff --git a/src/libfetchers/registry.hh b/src/libfetchers/registry.hh
index 260a2c460..f57ab1e6b 100644
--- a/src/libfetchers/registry.hh
+++ b/src/libfetchers/registry.hh
@@ -1,4 +1,5 @@
#pragma once
+///@file
#include "types.hh"
#include "fetchers.hh"