1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

Factor a function to get the store type from a URI out of the main RegisterStoreImplementation

This commit is contained in:
Shea Levy 2016-09-02 06:39:29 -04:00
parent a91954f0c6
commit 53b27ddce2
2 changed files with 36 additions and 19 deletions

View file

@ -5,6 +5,7 @@
#include "crypto.hh"
#include "lru-cache.hh"
#include "sync.hh"
#include "globals.hh"
#include <atomic>
#include <limits>
@ -590,6 +591,15 @@ void removeTempRoots();
ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE"));
enum StoreType {
tDaemon,
tLocal,
tOther
};
StoreType getStoreType(const std::string & uri = getEnv("NIX_REMOTE"), const std::string & stateDir = settings.nixStateDir);
/* Return the default substituter stores, defined by the
substituters option and various legacy options like
binary-caches. */