diff options
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/store-api.cc | 10 | ||||
-rw-r--r-- | src/libstore/store-api.hh | 6 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 5dd56f905d57..75456ab8c8af 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -506,7 +506,7 @@ namespace nix { RegisterStoreImplementation::Implementations * RegisterStoreImplementation::implementations = 0; -ref<Store> openStoreAt(const std::string & uri_) +ref<Store> openStore(const std::string & uri_) { auto uri(uri_); Store::Params params; @@ -529,12 +529,6 @@ ref<Store> openStoreAt(const std::string & uri_) } -ref<Store> openStore() -{ - return openStoreAt(getEnv("NIX_REMOTE")); -} - - static RegisterStoreImplementation regStore([]( const std::string & uri, const Store::Params & params) -> std::shared_ptr<Store> @@ -579,7 +573,7 @@ std::list<ref<Store>> getDefaultSubstituters() auto addStore = [&](const std::string & uri) { if (done.count(uri)) return; done.insert(uri); - state->stores.push_back(openStoreAt(uri)); + state->stores.push_back(openStore(uri)); }; for (auto uri : settings.get("substituters", Strings())) diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 41fc58fc48e2..76a2f5e9c791 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -587,11 +587,7 @@ void removeTempRoots(); If ‘uri’ is empty, it defaults to ‘direct’ or ‘daemon’ depending on whether the user has write access to the local Nix store/database. set to true *unless* you're going to collect garbage. */ -ref<Store> openStoreAt(const std::string & uri); - - -/* Open the store indicated by the ‘NIX_REMOTE’ environment variable. */ -ref<Store> openStore(); +ref<Store> openStore(const std::string & uri = getEnv("NIX_REMOTE")); /* Return the default substituter stores, defined by the |