7bc014aa9c
GitOrigin-RevId: c97e777ff06fcb8d37dcdf5e21e9eff1f34f0e90
38 lines
826 B
Nix
38 lines
826 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pypinyin";
|
|
version = "0.47.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "mozillazg";
|
|
repo = "python-pinyin";
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-c9pEO9k5tCFWLPismrXrrYEQYmxYKkciXFgpbrDEGzE=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pytest.ini --replace \
|
|
"--cov-report term-missing" ""
|
|
'';
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"tests"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Chinese Characters to Pinyin - 汉字转拼音";
|
|
homepage = "https://github.com/mozillazg/python-pinyin";
|
|
changelog = "https://github.com/mozillazg/python-pinyin/blob/master/CHANGELOG.rst";
|
|
license = licenses.mit;
|
|
maintainers = teams.tts.members;
|
|
};
|
|
}
|