2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, buildPythonPackage, fetchPypi, isPyPy
|
|
|
|
, dnspython
|
|
|
|
, geoip2
|
|
|
|
, ipython
|
|
|
|
, praw
|
|
|
|
, pyenchant
|
|
|
|
, pygeoip
|
2020-08-20 17:08:02 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, python
|
|
|
|
, pytz
|
2020-08-20 17:08:02 +00:00
|
|
|
, sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
, xmltodict
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sopel";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "7.0.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "5e394d9797e221f90a95e5eb9987e8c1faf4f2488964f521e8ca1628798f0a38";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dnspython
|
|
|
|
geoip2
|
|
|
|
ipython
|
|
|
|
praw
|
|
|
|
pyenchant
|
|
|
|
pygeoip
|
|
|
|
pytz
|
2020-08-20 17:08:02 +00:00
|
|
|
sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
|
|
|
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
2020-08-20 17:08:02 +00:00
|
|
|
--replace "praw>=4.0.0,<6.0.0" "praw"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
preCheck = ''
|
|
|
|
export TESTDIR=$(mktemp -d)
|
|
|
|
cp -R ./test $TESTDIR
|
|
|
|
pushd $TESTDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
popd
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Simple and extensible IRC bot";
|
|
|
|
homepage = "http://sopel.chat";
|
|
|
|
license = licenses.efl20;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|