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