diff --git a/pkgs/development/python-modules/dragonmapper/default.nix b/pkgs/development/python-modules/dragonmapper/default.nix new file mode 100644 index 000000000000..779ba542e9ca --- /dev/null +++ b/pkgs/development/python-modules/dragonmapper/default.nix @@ -0,0 +1,41 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + unittestCheckHook, + hanzidentifier, + zhon, +}: + +buildPythonPackage rec { + pname = "dragonmapper"; + version = "0.2.7"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tsroten"; + repo = "dragonmapper"; + tag = "v${version}"; + hash = "sha256-/02vcjcsUpQA1R1hcp34g/MSzNrKwuEyY5ERQQ5Vemw="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + hanzidentifier + zhon + ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "dragonmapper" ]; + + meta = { + description = "Identification and conversion functions for Chinese text processing"; + homepage = "https://github.com/tsroten/dragonmapper"; + changelog = "https://github.com/tsroten/dragonmapper/blob/${src.rev}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ShamrockLee ]; + }; +} diff --git a/pkgs/development/python-modules/hanzidentifier/default.nix b/pkgs/development/python-modules/hanzidentifier/default.nix new file mode 100644 index 000000000000..93021ac6addb --- /dev/null +++ b/pkgs/development/python-modules/hanzidentifier/default.nix @@ -0,0 +1,37 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + unittestCheckHook, + zhon, +}: + +buildPythonPackage rec { + pname = "hanzidentifier"; + version = "1.2.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tsroten"; + repo = "hanzidentifier"; + tag = "v${version}"; + hash = "sha256-TVS21zy5UR+tGgVRB6eUguy2PGgruxbc+QR0DYUWl4w="; + }; + + build-system = [ hatchling ]; + + dependencies = [ zhon ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "hanzidentifier" ]; + + meta = { + description = "A Python module that identifies Chinese text as being Simplified or Traditional"; + homepage = "https://github.com/tsroten/hanzidentifier"; + changelog = "https://github.com/tsroten/hanzidentifier/blob/${src.rev}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ShamrockLee ]; + }; +} diff --git a/pkgs/development/python-modules/zhon/default.nix b/pkgs/development/python-modules/zhon/default.nix new file mode 100644 index 000000000000..8148503af317 --- /dev/null +++ b/pkgs/development/python-modules/zhon/default.nix @@ -0,0 +1,34 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + unittestCheckHook, +}: + +buildPythonPackage rec { + pname = "zhon"; + version = "2.0.2"; + pyproject = true; + + src = fetchFromGitHub { + owner = "tsroten"; + repo = "zhon"; + tag = "v${version}"; + hash = "sha256-LFuEXu0IPJ6UFHhJKqQHp829wndNypmmhO0yZ1WEAXg="; + }; + + build-system = [ hatchling ]; + + nativeCheckInputs = [ unittestCheckHook ]; + + pythonImportsCheck = [ "zhon" ]; + + meta = { + description = "Constants used in Chinese text processing"; + homepage = "https://github.com/tsroten/zhon"; + changelog = "https://github.com/tsroten/zhon/blob/${src.rev}/CHANGES.rst"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ShamrockLee ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b427816903d0..cd113d17b676 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3928,6 +3928,8 @@ self: super: with self; { dragonfly = callPackage ../development/python-modules/dragonfly { }; + dragonmapper = callPackage ../development/python-modules/dragonmapper { }; + dramatiq = callPackage ../development/python-modules/dramatiq { }; drawille = callPackage ../development/python-modules/drawille { }; @@ -5876,6 +5878,8 @@ self: super: with self; { handy-archives = callPackage ../development/python-modules/handy-archives { }; + hanzidentifier = callPackage ../development/python-modules/hanzidentifier { }; + hap-python = callPackage ../development/python-modules/hap-python { }; harlequin-bigquery = callPackage ../development/python-modules/harlequin-bigquery { }; @@ -18838,6 +18842,8 @@ self: super: with self; { zha-quirks = callPackage ../development/python-modules/zha-quirks { }; + zhon = callPackage ../development/python-modules/zhon { }; + ziafont = callPackage ../development/python-modules/ziafont { }; ziamath = callPackage ../development/python-modules/ziamath { };