fix(nix): switch from cargoLock to cargoHash to fix crates.io 403 errors

The old `cargoLock` approach uses `importCargoLock` which downloads
individual crates from the deprecated `crates.io/api/v1/crates` URL
that now returns 403 errors.

Switching to `cargoHash` uses `fetchCargoVendor` which downloads from
`static.crates.io` (the CDN) via the sparse registry protocol,
avoiding the deprecated API entirely.
This commit is contained in:
copilot-swe-agent[bot] 2026-05-28 03:24:34 +00:00 committed by GitHub
parent 84da2917b2
commit 00e434fd63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,12 +26,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
pname = "yazi";
inherit version src;
cargoLock = {
lockFile = "${src}/Cargo.lock";
#outputHashes = {
# "mlua-0.10.0" = "sha256-Xg6/jc+UP8tbJJ6x1sbAgt8ZHt051xEBBcjmikQqYlw=";
#};
};
cargoHash = "sha256-EnxhbS+FO3MPKmNkh30x2Wwyf23CgZ/6B+guAwRq32Y=";
env = {
YAZI_GEN_COMPLETIONS = true;