nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 dawg2-python,
11 pymorphy3-dicts-ru,
12 pymorphy3-dicts-uk,
13
14 # tests
15 pytestCheckHook,
16 click,
17}:
18
19buildPythonPackage rec {
20 pname = "pymorphy3";
21 version = "2.0.6";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "no-plagiarism";
26 repo = "pymorphy3";
27 tag = version;
28 hash = "sha256-5s5v6+vMCeyn/73G5uUfRtTGkkqa7RNW8/r1v3Ay4us=";
29 };
30
31 build-system = [
32 setuptools
33 ];
34
35 dependencies = [
36 dawg2-python
37 pymorphy3-dicts-ru
38 pymorphy3-dicts-uk
39 ];
40
41 optional-dependencies = {
42 CLI = [
43 click
44 ];
45 };
46
47 nativeCheckInputs = [
48 pytestCheckHook
49 ]
50 ++ lib.concatAttrValues optional-dependencies;
51
52 pythonImportsCheck = [ "pymorphy3" ];
53
54 meta = {
55 description = "Morphological analyzer/inflection engine for Russian and Ukrainian";
56 mainProgram = "pymorphy";
57 homepage = "https://github.com/no-plagiarism/pymorphy3";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ jboy ];
60 };
61}