From 8e29af2f5f2397cd66a198778614b44aa3703186 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 3 Dec 2021 14:40:08 +0100 Subject: [PATCH] python3Packages.pykakasi: init at 2.2.1 --- .../python-modules/pykakasi/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/pykakasi/default.nix diff --git a/pkgs/development/python-modules/pykakasi/default.nix b/pkgs/development/python-modules/pykakasi/default.nix new file mode 100644 index 000000000000..13f5466b8a10 --- /dev/null +++ b/pkgs/development/python-modules/pykakasi/default.nix @@ -0,0 +1,62 @@ +{ lib +, buildPythonPackage +, deprecated +, fetchFromGitHub +, importlib-metadata +, jaconv +, 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; + rev = "v${version}"; + sha256 = "ivlenHPD00bxc0c9G368tfTEckOC3vqDB5kMQzHXbVM="; + }; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + jaconv + deprecated + ] ++ lib.optionals (pythonOlder "3.8") [ + importlib-metadata + ]; + + checkInputs = [ + 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"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 770e74056561..29c519a9bf30 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6658,6 +6658,8 @@ in { pyjwt = callPackage ../development/python-modules/pyjwt { }; + pykakasi = callPackage ../development/python-modules/pykakasi { }; + pykdl = callPackage ../development/python-modules/pykdl { }; pykdtree = callPackage ../development/python-modules/pykdtree {