mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-21 16:11:22 +00:00
rustPlatform.importCargoLock: download crates from static.crates.io
The crates.io API server's 1 req/sec rate limit currently surfaces as intermittent HTTP 403 errors when vendoring lockfiles. Switch to the CDN endpoint as recommended by upstream (rust-lang/crates.io#13482), mirroring the fix already applied to fetchCargoVendor in #512735. fetchurl is content-addressed by sha256, so the URL change does not affect any downstream store paths. Fixes #524979
This commit is contained in:
@@ -130,7 +130,10 @@ let
|
||||
};
|
||||
|
||||
registries = {
|
||||
"https://github.com/rust-lang/crates.io-index" = "https://crates.io/api/v1/crates";
|
||||
# Use static.crates.io (CDN) instead of crates.io/api to avoid the 1 req/sec
|
||||
# rate limit on the API servers, which currently returns intermittent 403s.
|
||||
# See https://github.com/rust-lang/crates.io/issues/13482
|
||||
"https://github.com/rust-lang/crates.io-index" = "https://static.crates.io/crates";
|
||||
}
|
||||
// extraRegistries;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user