2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPyPy
|
2020-04-24 23:36:52 +00:00
|
|
|
, dnspython
|
|
|
|
, geoip2
|
|
|
|
, ipython
|
|
|
|
, praw
|
|
|
|
, pyenchant
|
|
|
|
, pygeoip
|
2020-08-20 17:08:02 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytz
|
2020-08-20 17:08:02 +00:00
|
|
|
, sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
, xmltodict
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sopel";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "7.1.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "ebd3b2aa9230835f8a68ea7f5a10324ddf35d70d89a9c92c8cba81c558565efb";
|
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 \
|
2021-08-10 14:31:46 +00:00
|
|
|
--replace "praw>=4.0.0,<6.0.0" "praw" \
|
|
|
|
--replace "sqlalchemy<1.4" "sqlalchemy"
|
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
|
|
|
'';
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
pythonImportsCheck = [ "sopel" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simple and extensible IRC bot";
|
|
|
|
homepage = "http://sopel.chat";
|
|
|
|
license = licenses.efl20;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|