1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, cmake 6, ninja 7, cython 8, rapidfuzz-capi 9, scikit-build 10, setuptools 11, jarowinkler-cpp 12, hypothesis 13, pytestCheckHook 14}: 15 16buildPythonPackage rec { 17 pname = "jarowinkler"; 18 version = "1.2.3"; 19 20 disabled = pythonOlder "3.6"; 21 22 format = "pyproject"; 23 24 src = fetchFromGitHub { 25 owner = "maxbachmann"; 26 repo = "JaroWinkler"; 27 rev = "refs/tags/v${version}"; 28 hash = "sha256-j+ZabVsiVitNkTPhGjDg72XogjvPaL453lTW45ITm90="; 29 }; 30 31 nativeBuildInputs = [ 32 cmake 33 cython 34 ninja 35 rapidfuzz-capi 36 scikit-build 37 setuptools 38 ]; 39 40 buildInputs = [ 41 jarowinkler-cpp 42 ]; 43 44 preBuild = '' 45 export JAROWINKLER_BUILD_EXTENSION=1 46 ''; 47 48 dontUseCmakeConfigure = true; 49 50 checkInputs = [ 51 hypothesis 52 pytestCheckHook 53 ]; 54 55 pythonImportsCheck = [ "jarowinkler" ]; 56 57 meta = with lib; { 58 description = "Library for fast approximate string matching using Jaro and Jaro-Winkler similarity"; 59 homepage = "https://github.com/maxbachmann/JaroWinkler"; 60 changelog = "https://github.com/maxbachmann/JaroWinkler/blob/${src.rev}/CHANGELOG.md"; 61 license = licenses.mit; 62 maintainers = with maintainers; [ dotlambda ]; 63 }; 64}