From a345ed5ca43c1c075216536e5ccf99674bf1a686 Mon Sep 17 00:00:00 2001 From: Radik Islamov Date: Fri, 8 Mar 2024 23:17:10 +0500 Subject: [PATCH 1/2] python3Packages.tinysegmenter: init at 0.3 --- .../python-modules/tinysegmenter/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/tinysegmenter/default.nix diff --git a/pkgs/development/python-modules/tinysegmenter/default.nix b/pkgs/development/python-modules/tinysegmenter/default.nix new file mode 100644 index 000000000000..17b5558e5e23 --- /dev/null +++ b/pkgs/development/python-modules/tinysegmenter/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi + +, unittestCheckHook + +, setuptools +}: + +buildPythonPackage rec { + pname = "tinysegmenter"; + version = "0.3"; + pyproject = true; + + src = fetchPypi { + inherit pname version; + hash = "sha256-7R9tLoBqR1inO+WJdUOEy62tx+GkFMgaFm/JrfLUDG0="; + }; + + build-system = [ + setuptools + ]; + + nativeCheckInputs = [ + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "tests" ]; + + pythonImportsCheck = [ "tinysegmenter" ]; + + meta = with lib; { + description = "Very compact Japanese tokenizer"; + homepage = "https://tinysegmenter.tuxfamily.org"; + license = licenses.bsd3; + maintainers = with maintainers; [ vizid ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0d839d915855..f97eaa09b2c2 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14745,6 +14745,8 @@ self: super: with self; { tinyrecord = callPackage ../development/python-modules/tinyrecord { }; + tinysegmenter = callPackage ../development/python-modules/tinysegmenter { }; + tissue = callPackage ../development/python-modules/tissue { }; titlecase = callPackage ../development/python-modules/titlecase { }; From f5ba7fc8079b4f41d4069ad8e16d54c2d9d39fe5 Mon Sep 17 00:00:00 2001 From: Radik Islamov Date: Fri, 8 Mar 2024 23:22:36 +0500 Subject: [PATCH 2/2] python3Packages.tinysegmenter: 0.3 -> 0.4 --- pkgs/development/python-modules/tinysegmenter/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tinysegmenter/default.nix b/pkgs/development/python-modules/tinysegmenter/default.nix index 17b5558e5e23..2b56544061b7 100644 --- a/pkgs/development/python-modules/tinysegmenter/default.nix +++ b/pkgs/development/python-modules/tinysegmenter/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { pname = "tinysegmenter"; - version = "0.3"; + version = "0.4"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-7R9tLoBqR1inO+WJdUOEy62tx+GkFMgaFm/JrfLUDG0="; + hash = "sha256-ZEWL26VLp0gsAseF+WDPPWz2FZSk2rPWTDJUOQlPwbc="; }; build-system = [