2019-07-04 16:31:45 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
|
|
|
|
, dnspython
|
|
|
|
, geoip2
|
|
|
|
, ipython
|
2018-10-26 18:34:38 +01:00
|
|
|
, praw
|
|
|
|
, pyenchant
|
|
|
|
, pygeoip
|
2019-07-04 16:31:45 +01:00
|
|
|
, pytest
|
2018-10-26 18:34:38 +01:00
|
|
|
, python
|
2019-07-04 16:31:45 +01:00
|
|
|
, pytz
|
|
|
|
, xmltodict
|
2018-10-26 18:34:38 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sopel";
|
2019-07-04 16:31:45 +01:00
|
|
|
version = "6.6.9";
|
|
|
|
disabled = isPyPy;
|
2018-10-26 18:34:38 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2019-07-04 16:31:45 +01:00
|
|
|
sha256 = "1arldn3p2yp09wnn2cw50r5ri303d5jdsjnf6lgfl82jhfmk49a2";
|
2018-10-26 18:34:38 +01:00
|
|
|
};
|
|
|
|
|
2019-07-04 16:31:45 +01:00
|
|
|
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"
|
|
|
|
'';
|
2018-10-26 18:34:38 +01:00
|
|
|
|
2019-07-04 16:31:45 +01:00
|
|
|
checkInputs = [ pytest ];
|
2018-10-26 18:34:38 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2019-07-04 16:31:45 +01:00
|
|
|
HOME=$PWD # otherwise tries to create tmpdirs at root
|
|
|
|
pytest .
|
2018-10-26 18:34:38 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple and extensible IRC bot";
|
|
|
|
homepage = "http://sopel.chat";
|
|
|
|
license = licenses.efl20;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|