
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. It should be possible to reproduce this diff. To do so, get the list of files changed by this commit, e.g. with git diff --name-only, then run the following two commands, each with that list of files as their standard input: xargs sed -i 's/^\(. *\)\(cargoHash\)\b/\1useFetchCargoVendor = true;\n\1cargoHash/' cut -d / -f 4 | xargs -n 1 nix-update --version=skip This will take a long time. It might be possible to parallelize it using xargs' -P option. I haven't tested it.
45 lines
1018 B
Nix
45 lines
1018 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchCrate,
|
|
stdenv,
|
|
libiconv,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fst";
|
|
version = "0.4.3";
|
|
|
|
src = fetchCrate {
|
|
inherit version;
|
|
crateName = "fst-bin";
|
|
hash = "sha256-x2rvLMOhatMWU2u5GAdpYy2uuwZLi3apoE6aaTF+M1g=";
|
|
};
|
|
|
|
useFetchCargoVendor = true;
|
|
cargoHash = "sha256-zO2RYJpTyFFEQ+xZH4HU0CPaeiy6G3uq/qOwPawYSkk=";
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
csv="$(mktemp)"
|
|
fst="$(mktemp)"
|
|
printf "abc,1\nabcd,1" > "$csv"
|
|
$out/bin/fst map "$csv" "$fst" --force
|
|
$out/bin/fst fuzzy "$fst" 'abc'
|
|
$out/bin/fst --help > /dev/null
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Represent large sets and maps compactly with finite state transducers";
|
|
mainProgram = "fst";
|
|
homepage = "https://github.com/BurntSushi/fst";
|
|
license = with licenses; [
|
|
unlicense # or
|
|
mit
|
|
];
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
|
};
|
|
}
|