889482aab3
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
73 lines
1.2 KiB
Nix
73 lines
1.2 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, dnspython
|
|
, fetchPypi
|
|
, geoip2
|
|
, ipython
|
|
, isPyPy
|
|
, praw
|
|
, pyenchant
|
|
, pygeoip
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pytz
|
|
, sqlalchemy
|
|
, xmltodict
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sopel";
|
|
version = "7.1.9";
|
|
format = "setuptools";
|
|
|
|
disabled = isPyPy || pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-IJ+ovLQv6/UU1oepmUQjzaWBG3Rdd3xvui7FjK85Urs=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
dnspython
|
|
geoip2
|
|
ipython
|
|
praw
|
|
pyenchant
|
|
pygeoip
|
|
pytz
|
|
sqlalchemy
|
|
xmltodict
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace requirements.txt \
|
|
--replace "praw>=4.0.0,<6.0.0" "praw" \
|
|
--replace "sqlalchemy<1.4" "sqlalchemy" \
|
|
--replace "xmltodict==0.12" "xmltodict>=0.12"
|
|
'';
|
|
|
|
preCheck = ''
|
|
export TESTDIR=$(mktemp -d)
|
|
cp -R ./test $TESTDIR
|
|
pushd $TESTDIR
|
|
'';
|
|
|
|
postCheck = ''
|
|
popd
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"sopel"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Simple and extensible IRC bot";
|
|
homepage = "https://sopel.chat";
|
|
license = licenses.efl20;
|
|
maintainers = with maintainers; [ mog ];
|
|
};
|
|
}
|