aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/platform
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/platform')
-rw-r--r--src/libstore/platform/darwin.cc5
-rw-r--r--src/libstore/platform/fallback.cc4
-rw-r--r--src/libstore/platform/linux.cc4
3 files changed, 11 insertions, 2 deletions
diff --git a/src/libstore/platform/darwin.cc b/src/libstore/platform/darwin.cc
index 1f7e9be23..078753bff 100644
--- a/src/libstore/platform/darwin.cc
+++ b/src/libstore/platform/darwin.cc
@@ -261,4 +261,9 @@ void DarwinLocalDerivationGoal::execBuilder(std::string builder, Strings args, S
posix_spawn(nullptr, builder.c_str(), nullptr, &attrp, stringsToCharPtrs(args).data(), stringsToCharPtrs(envStrs).data());
}
+
+void registerLocalStore() {
+ StoreImplementations::add<DarwinLocalStore, LocalStoreConfig>();
+}
+
}
diff --git a/src/libstore/platform/fallback.cc b/src/libstore/platform/fallback.cc
index 5a01d64c8..0593ec204 100644
--- a/src/libstore/platform/fallback.cc
+++ b/src/libstore/platform/fallback.cc
@@ -1,5 +1,7 @@
#include "platform/fallback.hh"
namespace nix {
-static RegisterStoreImplementation<FallbackLocalStore, LocalStoreConfig> regLocalStore;
+void registerLocalStore() {
+ Implementations::add<FallbackLocalStore, LocalStoreConfig>();
+}
}
diff --git a/src/libstore/platform/linux.cc b/src/libstore/platform/linux.cc
index 03b8bc0be..f22fbe58f 100644
--- a/src/libstore/platform/linux.cc
+++ b/src/libstore/platform/linux.cc
@@ -25,7 +25,9 @@ namespace {
constexpr const std::string_view nativeSystem = SYSTEM;
}
-static RegisterStoreImplementation<LinuxLocalStore, LocalStoreConfig> regLocalStore;
+void registerLocalStore() {
+ StoreImplementations::add<LinuxLocalStore, LocalStoreConfig>();
+}
static void readProcLink(const std::string & file, UncheckedRoots & roots)
{