mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / cltk / default.nix
blob7635ace28648eadbf61cbcb5767d00d6e8fc5a09
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   poetry-core,
9   # dependencies
10   boltons,
11   gensim,
12   gitpython,
13   greek-accentuation,
14   nltk,
15   pyyaml,
16   rapidfuzz,
17   requests,
18   scikit-learn,
19   scipy,
20   spacy,
21   stanza,
22   stringcase,
23   torch,
24   tqdm,
26   # tests
27   pytestCheckHook,
29 buildPythonPackage rec {
30   pname = "cltk";
31   version = "1.3.0";
33   pyproject = true;
35   src = fetchFromGitHub {
36     owner = "cltk";
37     repo = "cltk";
38     rev = "refs/tags/v${version}";
39     hash = "sha256-/rdv96lnSGN+aJJmPSIan79zoXxnStokFEAjBtCLKy4=";
40   };
42   postPatch = ''
43     substituteInPlace pyproject.toml \
44       --replace-fail "poetry>=1.1.13" poetry-core \
45       --replace-fail "poetry.masonry.api" "poetry.core.masonry.api" \
46       --replace-fail 'scipy = "<1.13.0"' 'scipy = "^1"' \
47       --replace-fail 'boltons = "^21.0.0"' 'boltons = "^24.0.0"'
48   '';
50   build-system = [ poetry-core ];
52   pythonRelaxDeps = [
53     "spacy"
54   ];
56   dependencies = [
57     boltons
58     gensim
59     gitpython
60     greek-accentuation
61     nltk
62     pyyaml
63     rapidfuzz
64     requests
65     scikit-learn
66     scipy
67     spacy
68     stanza
69     stringcase
70     torch
71     tqdm
72   ];
74   nativeCheckInputs = [
75     pytestCheckHook
76   ];
78   preCheck = ''
79     export HOME=$(mktemp -d)
80   '';
82   # Most of tests fail as they require local files to be present and also internet access
83   doCheck = false;
85   meta = {
86     description = "Natural language processing (NLP) framework for pre-modern languages";
87     homepage = "https://cltk.org";
88     changelog = "https://github.com/cltk/cltk/releases/tag/v${version}";
89     license = lib.licenses.mit;
90     maintainers = with lib.maintainers; [ kmein ];
91   };