slippy: useFetchCargoVendor
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.
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
jq,
|
||||
moreutils,
|
||||
pkg-config,
|
||||
openssl,
|
||||
stdenv,
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user