Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pytestCheckHook, 6 pythonOlder, 7}: 8 9buildPythonPackage rec { 10 pname = "pypinyin"; 11 version = "0.51.0"; 12 format = "setuptools"; 13 14 disabled = pythonOlder "3.7"; 15 16 src = fetchFromGitHub { 17 owner = "mozillazg"; 18 repo = "python-pinyin"; 19 rev = "refs/tags/v${version}"; 20 hash = "sha256-kbUVif3a3L7BHj1b37FME5wicalK/iild0pvwPawr6Q="; 21 }; 22 23 postPatch = '' 24 substituteInPlace pytest.ini --replace \ 25 "--cov-report term-missing" "" 26 ''; 27 28 nativeCheckInputs = [ pytestCheckHook ]; 29 30 pytestFlagsArray = [ "tests" ]; 31 32 meta = with lib; { 33 description = "Chinese Characters to Pinyin - "; 34 mainProgram = "pypinyin"; 35 homepage = "https://github.com/mozillazg/python-pinyin"; 36 changelog = "https://github.com/mozillazg/python-pinyin/blob/v${version}/CHANGELOG.rst"; 37 license = licenses.mit; 38 maintainers = teams.tts.members; 39 }; 40}