Files
nixpkgs/pkgs/by-name/fs/fst/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

44 lines
988 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=";
};
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 ];
};
}