1{
2 lib,
3 buildPythonPackage,
4 dnspython,
5 fetchPypi,
6 geoip2,
7 ipython,
8 isPyPy,
9 setuptools,
10 praw,
11 pyenchant,
12 pytestCheckHook,
13 pythonOlder,
14 pytz,
15 sqlalchemy,
16 xmltodict,
17 importlib-metadata,
18 packaging,
19}:
20
21buildPythonPackage rec {
22 pname = "sopel";
23 version = "8.0.0";
24 pyproject = true;
25
26 disabled = isPyPy || pythonOlder "3.7";
27
28 src = fetchPypi {
29 inherit pname version;
30 hash = "sha256-juLJp0Et5qMZwBZzw0e4tKg1cBYqAsH8KUzqNoIP70U=";
31 };
32
33 build-system = [ setuptools ];
34
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace-fail "setuptools~=66.1" "setuptools"
38 '';
39
40 dependencies = [
41 dnspython
42 geoip2
43 ipython
44 praw
45 pyenchant
46 pytz
47 sqlalchemy
48 xmltodict
49 importlib-metadata
50 packaging
51 ];
52
53 pythonRemoveDeps = [ "sopel-help" ];
54
55 pythonRelaxDeps = [ "sqlalchemy" ];
56
57 nativeCheckInputs = [ pytestCheckHook ];
58
59 disabledTests = [
60 # requires network access
61 "test_example_exchange_cmd_0"
62 "test_example_exchange_cmd_1"
63 "test_example_duck_0"
64 "test_example_duck_1"
65 "test_example_suggest_0"
66 "test_example_suggest_1"
67 "test_example_suggest_2"
68 "test_example_tr2_0"
69 "test_example_tr2_1"
70 "test_example_tr2_2"
71 "test_example_title_command_0"
72 "test_example_wiktionary_0"
73 "test_example_wiktionary_ety_0"
74 ];
75
76 pythonImportsCheck = [ "sopel" ];
77
78 meta = with lib; {
79 description = "Simple and extensible IRC bot";
80 homepage = "https://sopel.chat";
81 license = licenses.efl20;
82 maintainers = with maintainers; [ mog ];
83 mainProgram = "sopel";
84 };
85}