2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, isPyPy
|
2019-07-04 16:31:45 +01:00
|
|
|
, dnspython
|
|
|
|
, geoip2
|
|
|
|
, ipython
|
2018-10-26 18:34:38 +01:00
|
|
|
, praw
|
|
|
|
, pyenchant
|
|
|
|
, pygeoip
|
2020-08-17 13:58:14 +01:00
|
|
|
, pytestCheckHook
|
2019-07-04 16:31:45 +01:00
|
|
|
, pytz
|
2020-08-17 13:58:14 +01:00
|
|
|
, sqlalchemy
|
2019-07-04 16:31:45 +01:00
|
|
|
, xmltodict
|
2018-10-26 18:34:38 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sopel";
|
2020-11-29 14:04:42 +00:00
|
|
|
version = "7.0.7";
|
2019-07-04 16:31:45 +01:00
|
|
|
disabled = isPyPy;
|
2018-10-26 18:34:38 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:42 +00:00
|
|
|
sha256 = "84d42708d176aecfb7b95299af0e484896f5f80df61f43c92d8e7a53de0b2099";
|
2018-10-26 18:34:38 +01:00
|
|
|
};
|
|
|
|
|
2019-07-04 16:31:45 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
dnspython
|
|
|
|
geoip2
|
|
|
|
ipython
|
|
|
|
praw
|
|
|
|
pyenchant
|
|
|
|
pygeoip
|
|
|
|
pytz
|
2020-08-17 13:58:14 +01:00
|
|
|
sqlalchemy
|
2019-07-04 16:31:45 +01:00
|
|
|
xmltodict
|
|
|
|
];
|
|
|
|
|
|
|
|
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
2020-08-17 13:58:14 +01:00
|
|
|
--replace "praw>=4.0.0,<6.0.0" "praw"
|
2019-07-04 16:31:45 +01:00
|
|
|
'';
|
2018-10-26 18:34:38 +01:00
|
|
|
|
2020-08-17 13:58:14 +01:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2018-10-26 18:34:38 +01:00
|
|
|
|
2020-08-17 13:58:14 +01:00
|
|
|
preCheck = ''
|
|
|
|
export TESTDIR=$(mktemp -d)
|
|
|
|
cp -R ./test $TESTDIR
|
|
|
|
pushd $TESTDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
popd
|
2018-10-26 18:34:38 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-26 18:34:38 +01:00
|
|
|
description = "Simple and extensible IRC bot";
|
|
|
|
homepage = "http://sopel.chat";
|
|
|
|
license = licenses.efl20;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|