1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6
7 setuptools,
8
9 spylls,
10}:
11
12buildPythonPackage rec {
13 pname = "phunspell";
14 version = "0.1.6";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "dvwright";
19 repo = "phunspell";
20 tag = "v${version}";
21 hash = "sha256-TlO9Ccr2iRN+s3JV+3P36RF9oFY32fj+24sKslZZCVk=";
22 };
23
24 patches = [
25 (fetchpatch {
26 name = "fix-package-data-warning.patch";
27 url = "https://github.com/dvwright/phunspell/commit/70a0ee8af8442797e03916cea31637c21e6d32d9.patch";
28 hash = "sha256-kSaKHd7dVJM8+2dqxjs26Hv0feNXAXXymUE97DNVBFM=";
29 })
30 (fetchpatch {
31 name = "replace-description-file-deprecated-option.patch";
32 url = "https://github.com/dvwright/phunspell/commit/331c593b486cebe1a9b72befa568de9b51033f15.patch";
33 hash = "sha256-gdYfeG1vBtjnDDCjmg+ZSuToqVe0hrzB3RIqBLGNvBQ=";
34 })
35 ];
36
37 build-system = [ setuptools ];
38
39 dependencies = [ spylls ];
40
41 # for tests need lots of RAM, just skip...
42 doCheck = false;
43
44 pythonImportsCheck = [ "phunspell" ];
45
46 meta = with lib; {
47 description = "Pure Python spell checker, wrapping spylls a port of Hunspell";
48 homepage = "https://github.com/dvwright/phunspell";
49 changelog = "https://github.com/dvwright/phunspell/releases/tag/v${version}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ vizid ];
52 };
53}