1{ lib, buildPythonPackage, fetchPypi, isPyPy
2, dnspython
3, geoip2
4, ipython
5, praw
6, pyenchant
7, pygeoip
8, pytestCheckHook
9, pytz
10, sqlalchemy
11, xmltodict
12}:
13
14buildPythonPackage rec {
15 pname = "sopel";
16 version = "7.0.7";
17 disabled = isPyPy;
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "84d42708d176aecfb7b95299af0e484896f5f80df61f43c92d8e7a53de0b2099";
22 };
23
24 propagatedBuildInputs = [
25 dnspython
26 geoip2
27 ipython
28 praw
29 pyenchant
30 pygeoip
31 pytz
32 sqlalchemy
33 xmltodict
34 ];
35
36 # remove once https://github.com/sopel-irc/sopel/pull/1653 lands
37 postPatch = ''
38 substituteInPlace requirements.txt \
39 --replace "praw>=4.0.0,<6.0.0" "praw"
40 '';
41
42 checkInputs = [ pytestCheckHook ];
43
44 preCheck = ''
45 export TESTDIR=$(mktemp -d)
46 cp -R ./test $TESTDIR
47 pushd $TESTDIR
48 '';
49
50 postCheck = ''
51 popd
52 '';
53
54 pythonImportsCheck = [ "sopel" ];
55
56 meta = with lib; {
57 description = "Simple and extensible IRC bot";
58 homepage = "http://sopel.chat";
59 license = licenses.efl20;
60 maintainers = with maintainers; [ mog ];
61 };
62}