1{ 2 lib, 3 buildPythonPackage, 4 deprecated, 5 fetchFromGitHub, 6 importlib-metadata, 7 jaconv, 8 py-cpuinfo, 9 pytest-benchmark, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13 setuptools-scm, 14}: 15 16buildPythonPackage rec { 17 pname = "pykakasi"; 18 version = "2.2.1"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "miurahr"; 25 repo = "pykakasi"; 26 rev = "refs/tags/v${version}"; 27 hash = "sha256-ivlenHPD00bxc0c9G368tfTEckOC3vqDB5kMQzHXbVM=="; 28 }; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace-fail ', "klepto"' "" 33 ''; 34 35 build-system = [ setuptools-scm ]; 36 37 dependencies = [ 38 jaconv 39 deprecated 40 setuptools 41 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ]; 42 43 nativeCheckInputs = [ 44 py-cpuinfo 45 pytest-benchmark 46 pytestCheckHook 47 ]; 48 49 disabledTests = [ 50 # We don't care about benchmarks 51 "test_benchmark" 52 "pytest_benchmark_update_machine_info" 53 "pytest_benchmark_update_json" 54 ]; 55 56 pythonImportsCheck = [ "pykakasi" ]; 57 58 meta = with lib; { 59 description = "Python converter for Japanese Kana-kanji sentences into Kana-Roman"; 60 mainProgram = "kakasi"; 61 homepage = "https://github.com/miurahr/pykakasi"; 62 changelog = "https://github.com/miurahr/pykakasi/releases/tag/v${version}"; 63 license = licenses.mit; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}