Commit 02f21bf
committed
fix(flake): switch to useFetchCargoVendor for crates.io UA compatibility
crates.io added a User-Agent blocklist in late April 2026 that rejects
requests without an identifying UA. nixpkgs has two crate-fetching
paths:
- fetchCargoVendor — patched in NixOS/nixpkgs#512735 (merged 2026-04-26)
to send 'User-Agent: nixpkgs fetchCargoVendor/2' and fetch from
static.crates.io
- importCargoLock — used by cargoLock.lockFile = ...; has its own
inline fetchCrate calling fetchurl; NOT yet patched upstream;
receives 403 on every crate download
Switching to useFetchCargoVendor + cargoHash routes through the
patched path. Cargo.lock stays as the source of truth; only the
flake.nix attribute changes.1 parent c71451a commit 02f21bf
1 file changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
57 | 67 | | |
58 | 68 | | |
59 | 69 | | |
60 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
61 | 77 | | |
62 | 78 | | |
63 | 79 | | |
| |||
0 commit comments