2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, deprecated
|
|
|
|
, fetchFromGitHub
|
|
|
|
, importlib-metadata
|
|
|
|
, jaconv
|
2023-03-04 12:14:45 +00:00
|
|
|
, py-cpuinfo
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytest-benchmark
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, setuptools-scm
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pykakasi";
|
|
|
|
version = "2.2.1";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miurahr";
|
|
|
|
repo = pname;
|
2023-03-04 12:14:45 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-ivlenHPD00bxc0c9G368tfTEckOC3vqDB5kMQzHXbVM==";
|
2021-12-06 16:07:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jaconv
|
|
|
|
deprecated
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-04 12:14:45 +00:00
|
|
|
py-cpuinfo
|
2021-12-06 16:07:01 +00:00
|
|
|
pytest-benchmark
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# We don't care about benchmarks
|
|
|
|
"test_benchmark"
|
|
|
|
"pytest_benchmark_update_machine_info"
|
|
|
|
"pytest_benchmark_update_json"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"pykakasi"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python converter for Japanese Kana-kanji sentences into Kana-Roman";
|
|
|
|
homepage = "https://github.com/miurahr/pykakasi";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/miurahr/pykakasi/releases/tag/v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|