diff --git a/nix/yazi-unwrapped.nix b/nix/yazi-unwrapped.nix index 7145ecb9..b3797b62 100644 --- a/nix/yazi-unwrapped.nix +++ b/nix/yazi-unwrapped.nix @@ -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;