Skip to content

Commit

Permalink
kanata: useFetchCargoVendor
Browse files Browse the repository at this point in the history
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.

Being optimistic that fetchCargoVendor will have resolved the
case-insensitivity issues.
  • Loading branch information
alyssais committed Jan 28, 2025
1 parent c48916c commit 93f86b0
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions pkgs/by-name/ka/kanata/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,8 @@ rustPlatform.buildRustPackage rec {
sha256 = "sha256-cG9so0x0y8CbTxLOxSQwn5vG72KxHJzzTIH4lQA4MvE=";
};

cargoHash = "sha256-QQrFUJ24Qnrx8+7+h9riycXZSQUdH1sXMhpDzU9AXiI=";

# the dependency native-windows-gui contains both README.md and readme.md,
# which causes a hash mismatch on systems with a case-insensitive filesystem
# this removes the readme files and updates cargo's checksum file accordingly
depsExtraArgs = {
nativeBuildInputs = [
jq
moreutils
];

postBuild = ''
pushd $name/native-windows-gui
rm --force --verbose README.md readme.md
jq 'del(.files."README.md") | del(.files."readme.md")' \
.cargo-checksum.json -c \
| sponge .cargo-checksum.json
popd
'';
};
useFetchCargoVendor = true;
cargoHash = "sha256-VKvle1hQae+0Vbvd7Epq3cDqG8OV5J2mowF5lue59oc=";

buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.IOKit ];

Expand Down

0 comments on commit 93f86b0

Please sign in to comment.