forked from mirrors/nixpkgs
85f96822a0
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in which cargo vendor erroneously changed permissions of vendored crates. This was fixed in Rust 1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are potentially broken. This change updates cargoSha256/cargoHash tree-wide. Fixes #121994.
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, libiconv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "fst";
|
|
version = "0.4.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "BurntSushi";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "01qdj7zzgwb1zqcznfmnks3dnl6hnf8ib0sm0sgimsbcvajmhab3";
|
|
};
|
|
|
|
cargoPatches = [
|
|
# Add Cargo.lock lockfile, which upstream does not include
|
|
./0001-cargo-lockfile.patch
|
|
];
|
|
|
|
cargoBuildFlags = [ "--workspace" ];
|
|
cargoSha256 = "0440p0hb3nlq9wwk3zac9dldanslrddvqn4gib0vl7aikxkcvh4l";
|
|
|
|
buildInputs = lib.optionals stdenv.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";
|
|
homepage = "https://github.com/BurntSushi/fst";
|
|
license = with licenses; [ unlicense /* or */ mit ];
|
|
maintainers = with maintainers; [ rmcgibbo ];
|
|
};
|
|
}
|