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
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -778,7 +778,11 @@ std::list<ref<Store>> getDefaultSubstituters() | ||||||
|         state->stores.push_back(openStore(uri)); |         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); |         addStore(uri); | ||||||
| 
 | 
 | ||||||
|     for (auto uri : settings.get("extra-binary-caches", Strings())) |     for (auto uri : settings.get("extra-binary-caches", Strings())) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue