2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypinyin";
|
2023-02-09 11:40:11 +00:00
|
|
|
version = "0.48.0";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozillazg";
|
|
|
|
repo = "python-pinyin";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-gt0jrDPr6FeLB5P9HCSosCHb/W1sAKSusTrCpkqO26E=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace \
|
|
|
|
"--cov-report term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-17 00:35:05 +00:00
|
|
|
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;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = teams.tts.members;
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
}
|