1{ stdenv, buildPythonPackage, fetchPypi, isPyPy
2, dnspython
3, geoip2
4, ipython
5, praw
6, pyenchant
7, pygeoip
8, pytest
9, python
10, pytz
11, xmltodict
12}:
13
14buildPythonPackage rec {
15 pname = "sopel";
16 version = "6.6.9";
17 disabled = isPyPy;
18
19 src = fetchPypi {
20 inherit pname version;
21 sha256 = "1arldn3p2yp09wnn2cw50r5ri303d5jdsjnf6lgfl82jhfmk49a2";
22 };
23
24 propagatedBuildInputs = [
25 dnspython
26 geoip2
27 ipython
28 praw
29 pyenchant
30 pygeoip
31 pytz
32 xmltodict
33 ];
34
35 # remove once https://github.com/sopel-irc/sopel/pull/1653 lands
36 postPatch = ''
37 substituteInPlace requirements.txt \
38 --replace "praw<6.0.0" "praw<7.0.0"
39 '';
40
41 checkInputs = [ pytest ];
42
43 checkPhase = ''
44 HOME=$PWD # otherwise tries to create tmpdirs at root
45 pytest .
46 '';
47
48 meta = with stdenv.lib; {
49 description = "Simple and extensible IRC bot";
50 homepage = "http://sopel.chat";
51 license = licenses.efl20;
52 maintainers = with maintainers; [ mog ];
53 };
54}