aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/gc-store.hh
diff options
context:
space:
mode:
authorArtemis Tosini <lix@artem.ist>2024-04-22 17:32:21 +0000
committerArtemis Tosini <lix@artem.ist>2024-04-23 16:17:05 +0000
commitb247ef72dc7bcc857288c0ddcceb3e42f76a78f1 (patch)
tree01ec226e6f1e030797bde73bac219c2eb87e7c00 /src/libstore/gc-store.hh
parentc8c838381d8e76450ffd57b778bb28217b32084d (diff)
libstore: Create platform LocalStore subclasses
This creates new subclasses of LocalStore for each OS to include platform-specific functionality. Currently this just includes garbage collector roots but it could be extended to sandboxing as well. In order to make sure that the generic LocalStore is not accidentally constructed, its constructor is protected. A Fallback is provided which implements no functionality except constructors. Change-Id: I836a28e90b68309873f75afb83e0f1b2e2c89fb3
Diffstat (limited to 'src/libstore/gc-store.hh')
-rw-r--r--src/libstore/gc-store.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/gc-store.hh b/src/libstore/gc-store.hh
index ab1059fb1..88c997247 100644
--- a/src/libstore/gc-store.hh
+++ b/src/libstore/gc-store.hh
@@ -7,7 +7,14 @@
namespace nix {
+/**
+ * Garbage-collector roots, referring to a store path
+ */
typedef std::unordered_map<StorePath, std::unordered_set<std::string>> Roots;
+/**
+ * Possible garbage collector roots, referring to any path
+ */
+typedef std::unordered_map<Path, std::unordered_set<std::string>> UncheckedRoots;
struct GCOptions