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";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "7.1.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-03-05 16:20:37 +00:00
|
|
|
sha256 = "sha256-zxb95GVcDrd3FG/k+0PLg+dVlMgQpf1ntG8jF/zpHH4=";
|
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";
|
2022-01-03 16:56:52 +00:00
|
|
|
homepage = "https://sopel.chat";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.efl20;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|