1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 unittestCheckHook,
7 zhon,
8}:
9
10buildPythonPackage rec {
11 pname = "hanzidentifier";
12 version = "1.3.0";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "tsroten";
17 repo = "hanzidentifier";
18 tag = "v${version}";
19 hash = "sha256-SXIMk5Pr2jqoWOjKfVVhe6fHdbh3j+5Lnlru7St8bgA=";
20 };
21
22 build-system = [ hatchling ];
23
24 dependencies = [ zhon ];
25
26 nativeCheckInputs = [ unittestCheckHook ];
27
28 pythonImportsCheck = [ "hanzidentifier" ];
29
30 meta = {
31 description = "Python module that identifies Chinese text as being Simplified or Traditional";
32 homepage = "https://github.com/tsroten/hanzidentifier";
33 changelog = "https://github.com/tsroten/hanzidentifier/blob/${src.rev}/CHANGES.rst";
34 license = lib.licenses.mit;
35 maintainers = with lib.maintainers; [ ShamrockLee ];
36 };
37}