aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/platform.cc
blob: acdedab9991530772de2b84267d18d90129bfb67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "local-store.hh"

#if __linux__
#include "platform/linux.hh"
#elif __APPLE__
#include "platform/darwin.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));
#elif __APPLE__
    return std::shared_ptr<LocalStore>(new DarwinLocalStore(params));
#else
    return std::shared_ptr<LocalStore>(new FallbackLocalStore(params));
#endif
}
}