aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/sopel/default.nix
blob: d01fd722ab8309428464800b8c0a969da8c4a9e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
, dnspython
, geoip2
, ipython
, praw
, pyenchant
, pygeoip
, pytest
, python
, pytz
, xmltodict
}:

buildPythonPackage rec {
  pname = "sopel";
  version = "6.6.9";
  disabled = isPyPy;

  src = fetchPypi {
    inherit pname version;
    sha256 = "1arldn3p2yp09wnn2cw50r5ri303d5jdsjnf6lgfl82jhfmk49a2";
  };

  propagatedBuildInputs = [
    dnspython
    geoip2
    ipython
    praw
    pyenchant
    pygeoip
    pytz
    xmltodict
  ];

  # remove once https://github.com/sopel-irc/sopel/pull/1653 lands
  postPatch = ''
    substituteInPlace requirements.txt \
      --replace "praw<6.0.0" "praw<7.0.0"
  '';

  checkInputs = [ pytest ];

  checkPhase = ''
    HOME=$PWD # otherwise tries to create tmpdirs at root
    pytest .
  '';

  meta = with stdenv.lib; {
    description = "Simple and extensible IRC bot";
    homepage = "http://sopel.chat";
    license = licenses.efl20;
    maintainers = with maintainers; [ mog ];
  };
}