gg-jj: fetchCargoTarball -> fetchCargoVendor

Cargo 1.84.0 seems to have changed the output format of cargo vendor
again, once again invalidating fetchCargoTarball FOD hashes.  It's
time to fix this once and for all, switching across the board to
fetchCargoVendor, which is not dependent on cargo vendor's output
format.
This commit is contained in:
Alyssa Ross
2025-01-30 16:11:33 +01:00
parent b19c3c88b1
commit 5154fd685c
+8 -3
View File
@@ -37,13 +37,18 @@ stdenv.mkDerivation (finalAttrs: {
buildAndTestSubdir = "src-tauri";
# FIXME: Switch back to cargoHash when https://github.com/NixOS/nixpkgs/issues/356811 is fixed
cargoDeps = rustPlatform.fetchCargoTarball {
inherit (finalAttrs) pname version src patches;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs)
pname
version
src
patches
;
# Tries to apply patches inside cargoRoot.
prePatch = "pushd ..";
postPatch = "popd";
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.cargoRoot}";
hash = "sha256-inwETdMRKmJklkdjkcGuJuHaXwa5GyJEk7zo2r2li+M=";
hash = "sha256-zEYU5l57VxVKKhoGfa77kT05vwoLyAu9eyt7C9dhAGM=";
};
npmDeps = fetchNpmDeps {