aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/fetchers.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2022-02-24 18:09:00 +0100
committerEelco Dolstra <edolstra@gmail.com>2022-02-24 18:09:00 +0100
commit8518cebfceb36f3744c276cc8dbf432b1275f53f (patch)
tree35369f7e062925259668b991ee58b4b8ac286d01 /src/libfetchers/fetchers.hh
parent3317866060bfb88e0113b5d6275d1ad0e3f74d8d (diff)
libfetchers: Rename immutable -> locked
This is more consistent with flake terminology.
Diffstat (limited to 'src/libfetchers/fetchers.hh')
-rw-r--r--src/libfetchers/fetchers.hh12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libfetchers/fetchers.hh b/src/libfetchers/fetchers.hh
index 2836af5fa..bc9a76b0b 100644
--- a/src/libfetchers/fetchers.hh
+++ b/src/libfetchers/fetchers.hh
@@ -34,7 +34,7 @@ struct Input
std::shared_ptr<InputScheme> scheme; // note: can be null
Attrs attrs;
- bool immutable = false;
+ bool locked = false;
bool direct = true;
/* path of the parent of this input, used for relative path resolution */
@@ -59,9 +59,9 @@ public:
one that goes through a registry. */
bool isDirect() const { return direct; }
- /* Check whether this is an "immutable" input, that is,
+ /* Check whether this is a "locked" input, that is,
one that contains a commit hash or content hash. */
- bool isImmutable() const { return immutable; }
+ bool isLocked() const { return locked; }
bool hasAllInfo() const;
@@ -69,6 +69,8 @@ public:
bool contains(const Input & other) const;
+ /* 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(
@@ -146,14 +148,14 @@ DownloadFileResult downloadFile(
ref<Store> store,
const std::string & url,
const std::string & name,
- bool immutable,
+ bool locked,
const Headers & headers = {});
std::pair<Tree, time_t> downloadTarball(
ref<Store> store,
const std::string & url,
const std::string & name,
- bool immutable,
+ bool locked,
const Headers & headers = {});
}