Only use cache.nixos.org when the store is /nix/store
This is consistent with the behaviour of the old download-from-binary-cache substituter.
This commit is contained in:
parent
ecbc3fedd3
commit
e1e49c58e1
|
@ -778,7 +778,11 @@ std::list<ref<Store>> getDefaultSubstituters()
|
|||
state->stores.push_back(openStore(uri));
|
||||
};
|
||||
|
||||
for (auto uri : settings.get("substituters", settings.get("binary-caches", Strings{"https://cache.nixos.org/"})))
|
||||
Strings defaultSubstituters;
|
||||
if (settings.nixStore == "/nix/store")
|
||||
defaultSubstituters.push_back("https://cache.nixos.org/");
|
||||
|
||||
for (auto uri : settings.get("substituters", settings.get("binary-caches", defaultSubstituters)))
|
||||
addStore(uri);
|
||||
|
||||
for (auto uri : settings.get("extra-binary-caches", Strings()))
|
||||
|
|
Loading…
Reference in a new issue