nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-cov-stub,
7}:
8
9buildPythonPackage rec {
10 pname = "pypinyin";
11 version = "0.55.0";
12 format = "setuptools";
13
14 src = fetchFromGitHub {
15 owner = "mozillazg";
16 repo = "python-pinyin";
17 tag = "v${version}";
18 hash = "sha256-Xd5dxEiaByjtZmlORyK4cBPfNyIcZwbF40SvEKZ24Ks=";
19 };
20
21 nativeCheckInputs = [
22 pytestCheckHook
23 pytest-cov-stub
24 ];
25
26 enabledTestPaths = [ "tests" ];
27
28 meta = {
29 description = "Chinese Characters to Pinyin - 汉字转拼音";
30 mainProgram = "pypinyin";
31 homepage = "https://github.com/mozillazg/python-pinyin";
32 changelog = "https://github.com/mozillazg/python-pinyin/blob/${src.tag}/CHANGELOG.rst";
33 license = lib.licenses.mit;
34 teams = [ lib.teams.tts ];
35 };
36}