mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix(nix): use cargoLock with static.crates.io CDN to fix 403 errors
Revert cargoHash back to cargoLock (no hash updates needed on cargo update) and use extraRegistries to override the download URL to static.crates.io CDN, avoiding the rate-limited crates.io API endpoint that returns intermittent 403 errors. This is the same fix as NixOS/nixpkgs#524985 but applied locally via extraRegistries override, so it works without updating nixpkgs. See: https://github.com/rust-lang/crates.io/issues/13482
This commit is contained in:
parent
00e434fd63
commit
6b8b1e160c
1 changed files with 10 additions and 1 deletions
|
|
@ -26,7 +26,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
pname = "yazi";
|
||||
inherit version src;
|
||||
|
||||
cargoHash = "sha256-EnxhbS+FO3MPKmNkh30x2Wwyf23CgZ/6B+guAwRq32Y=";
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
# Use static.crates.io (CDN) instead of crates.io/api to avoid the 1 req/sec
|
||||
# rate limit which currently returns intermittent 403s.
|
||||
# See https://github.com/rust-lang/crates.io/issues/13482
|
||||
# This override can be removed once nixpkgs includes NixOS/nixpkgs#524985.
|
||||
extraRegistries = {
|
||||
"https://github.com/rust-lang/crates.io-index" = "https://static.crates.io/crates";
|
||||
};
|
||||
};
|
||||
|
||||
env = {
|
||||
YAZI_GEN_COMPLETIONS = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue