2025-06-02 05:56:37 +02:00

40 lines
850 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pytest-cov-stub,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pypinyin";
version = "0.54.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mozillazg";
repo = "python-pinyin";
tag = "v${version}";
hash = "sha256-kA6h2CPGhoZt8h3KEttegHhmMqVc72IkrkA3PonY3sY=";
};
nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
];
pytestFlagsArray = [ "tests" ];
meta = with lib; {
description = "Chinese Characters to Pinyin - ";
mainProgram = "pypinyin";
homepage = "https://github.com/mozillazg/python-pinyin";
changelog = "https://github.com/mozillazg/python-pinyin/blob/${src.tag}/CHANGELOG.rst";
license = licenses.mit;
teams = [ teams.tts ];
};
}