1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, isPy3k 6, pytest 7, unicodecsv 8, rustPlatform 9, libiconv 10}: 11 12buildPythonPackage rec { 13 pname = "jellyfish"; 14 version = "1.0.0"; 15 16 disabled = !isPy3k; 17 18 format = "pyproject"; 19 20 src = fetchPypi { 21 inherit pname version; 22 hash = "sha256-iBquNnGZm7B85QwnaW8pyn6ELz4SOswNtlJcmZmIG9Q="; 23 }; 24 25 nativeBuildInputs = with rustPlatform; [ 26 maturinBuildHook 27 cargoSetupHook 28 ]; 29 30 buildInputs = lib.optionals stdenv.isDarwin [ 31 libiconv 32 ]; 33 34 cargoDeps = rustPlatform.fetchCargoTarball { 35 inherit src; 36 name = "${pname}-${version}-rust-dependencies"; 37 hash = "sha256-Grk+n4VCPjirafcRWWI51jHw/IFUYkBtbXY739j0MFI="; 38 }; 39 40 nativeCheckInputs = [ pytest unicodecsv ]; 41 42 meta = { 43 homepage = "https://github.com/sunlightlabs/jellyfish"; 44 description = "Approximate and phonetic matching of strings"; 45 maintainers = with lib.maintainers; [ koral ]; 46 }; 47}