Skip to content

Commit

Permalink
slippy: 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.

fetchCargoVendor should resolve the case sensitivity issues previously
affecting the cargoHash.
  • Loading branch information
alyssais committed Jan 30, 2025
1 parent 8c0e863 commit 100e36a
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions pkgs/by-name/sl/slippy/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
lib,
rustPlatform,
fetchFromGitHub,
jq,
moreutils,
pkg-config,
openssl,
stdenv,
Expand All @@ -21,28 +19,8 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-7Uvo5+saxwTMQjfDliyOYC6j6LbpMf/FiONfX38xepI=";
};

cargoHash = "sha256-6nB+rHBJU9qhA7azz2ynaBw1UJdwE+T7pgpoPzhD5Bk=";

# the dependency css-minify 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/css-minify
rm -f 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-RGSc+jy2i97QZGfafe3M25bunBmCYAJ0UW3dAnvl5gs=";

nativeBuildInputs = [
pkg-config
Expand Down

0 comments on commit 100e36a

Please sign in to comment.