#include "local-store.hh" #include "build/local-derivation-goal.hh" #if __linux__ #include "platform/linux.hh" #elif __APPLE__ #include "platform/darwin.hh" #elif __FreeBSD__ #include "platform/freebsd.hh" #else #include "platform/fallback.hh" #endif namespace nix { std::shared_ptr LocalStore::makeLocalStore(const Params & params) { #if __linux__ return std::shared_ptr(new LinuxLocalStore(params)); #elif __APPLE__ return std::shared_ptr(new DarwinLocalStore(params)); #elif __FreeBSD__ return std::shared_ptr(new FreeBSDLocalStore(params)); #else return std::shared_ptr(new FallbackLocalStore(params)); #endif } std::shared_ptr LocalDerivationGoal::makeLocalDerivationGoal( const StorePath & drvPath, const OutputsSpec & wantedOutputs, Worker & worker, bool isDependency, BuildMode buildMode ) { #if __linux__ return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #elif __APPLE__ return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #elif __FreeBSD__ return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #else return std::make_shared(drvPath, wantedOutputs, worker, isDependency, buildMode); #endif } std::shared_ptr LocalDerivationGoal::makeLocalDerivationGoal( const StorePath & drvPath, const BasicDerivation & drv, const OutputsSpec & wantedOutputs, Worker & worker, bool isDependency, BuildMode buildMode ) { #if __linux__ return std::make_shared( drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #elif __APPLE__ return std::make_shared( drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #elif __FreeBSD__ return std::make_shared( drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #else return std::make_shared( drvPath, drv, wantedOutputs, worker, isDependency, buildMode ); #endif } }