1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 hatchling, 6 unittestCheckHook, 7}: 8 9buildPythonPackage rec { 10 pname = "zhon"; 11 version = "2.1.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "tsroten"; 16 repo = "zhon"; 17 tag = "v${version}"; 18 hash = "sha256-ghZp+5YXmTWf1EJKvdSlqccnxnaLliYR5HxX5DcWXiw="; 19 }; 20 21 build-system = [ hatchling ]; 22 23 nativeCheckInputs = [ unittestCheckHook ]; 24 25 pythonImportsCheck = [ "zhon" ]; 26 27 meta = { 28 description = "Constants used in Chinese text processing"; 29 homepage = "https://github.com/tsroten/zhon"; 30 changelog = "https://github.com/tsroten/zhon/blob/${src.rev}/CHANGES.rst"; 31 license = lib.licenses.mit; 32 maintainers = with lib.maintainers; [ ShamrockLee ]; 33 }; 34}