aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/platform.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/platform.cc')
-rw-r--r--src/libstore/platform.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libstore/platform.cc b/src/libstore/platform.cc
new file mode 100644
index 000000000..9c389ef55
--- /dev/null
+++ b/src/libstore/platform.cc
@@ -0,0 +1,18 @@
+#include "local-store.hh"
+
+#if __linux__
+#include "platform/linux.hh"
+#else
+#include "platform/fallback.hh"
+#endif
+
+namespace nix {
+std::shared_ptr<LocalStore> LocalStore::makeLocalStore(const Params & params)
+{
+#if __linux__
+ return std::shared_ptr<LocalStore>(new LinuxLocalStore(params));
+#else
+ return std::shared_ptr<LocalStore>(new FallbackLocalStore(params));
+#endif
+}
+}