2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, dnspython
|
2022-06-26 10:26:21 +00:00
|
|
|
, fetchPypi
|
2020-04-24 23:36:52 +00:00
|
|
|
, geoip2
|
|
|
|
, ipython
|
2022-06-26 10:26:21 +00:00
|
|
|
, isPyPy
|
2020-04-24 23:36:52 +00:00
|
|
|
, praw
|
|
|
|
, pyenchant
|
|
|
|
, pygeoip
|
2020-08-20 17:08:02 +00:00
|
|
|
, pytestCheckHook
|
2022-06-26 10:26:21 +00:00
|
|
|
, pythonOlder
|
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-06-26 10:26:21 +00:00
|
|
|
version = "7.1.9";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = isPyPy || pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-IJ+ovLQv6/UU1oepmUQjzaWBG3Rdd3xvui7FjK85Urs=";
|
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
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
2021-08-10 14:31:46 +00:00
|
|
|
--replace "praw>=4.0.0,<6.0.0" "praw" \
|
2022-06-26 10:26:21 +00:00
|
|
|
--replace "sqlalchemy<1.4" "sqlalchemy" \
|
|
|
|
--replace "xmltodict==0.12" "xmltodict>=0.12"
|
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
|
|
|
'';
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"sopel"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|