sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / fs / fst / package.nix
blob33c819f881c11000be7aa43bdd5ebeba00fefca5
2   lib,
3   rustPlatform,
4   fetchCrate,
5   stdenv,
6   libiconv,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "fst";
11   version = "0.4.3";
13   src = fetchCrate {
14     inherit version;
15     crateName = "fst-bin";
16     hash = "sha256-x2rvLMOhatMWU2u5GAdpYy2uuwZLi3apoE6aaTF+M1g=";
17   };
19   cargoHash = "sha256-yTbEaw+BbjVks3j7/b75kGoUjVftLaVYvYIdI/bbfdk=";
21   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
23   doInstallCheck = true;
24   installCheckPhase = ''
25     csv="$(mktemp)"
26     fst="$(mktemp)"
27     printf "abc,1\nabcd,1" > "$csv"
28     $out/bin/fst map "$csv" "$fst" --force
29     $out/bin/fst fuzzy "$fst" 'abc'
30     $out/bin/fst --help > /dev/null
31   '';
33   meta = with lib; {
34     description = "Represent large sets and maps compactly with finite state transducers";
35     mainProgram = "fst";
36     homepage = "https://github.com/BurntSushi/fst";
37     license = with licenses; [
38       unlicense # or
39       mit
40     ];
41     maintainers = with maintainers; [ rmcgibbo ];
42   };