nixpkgs/pkgs/development/python-modules/sopel/default.nix

64 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchPypi, isPyPy
, dnspython
, geoip2
, ipython
, praw
, pyenchant
, pygeoip
2020-08-17 13:58:14 +01:00
, pytestCheckHook
, pytz
2020-08-17 13:58:14 +01:00
, sqlalchemy
, xmltodict
}:
buildPythonPackage rec {
pname = "sopel";
2021-09-23 01:00:02 +01:00
version = "7.1.4";
disabled = isPyPy;
src = fetchPypi {
inherit pname version;
2021-09-23 01:00:02 +01:00
sha256 = "d778ec2b92866eddf97d0809968bc5f9887cb5a000a518a4b67d8eb999cb775c";
};
propagatedBuildInputs = [
dnspython
geoip2
ipython
praw
pyenchant
pygeoip
pytz
2020-08-17 13:58:14 +01:00
sqlalchemy
xmltodict
];
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
postPatch = ''
substituteInPlace requirements.txt \
2021-08-09 21:21:10 +01:00
--replace "praw>=4.0.0,<6.0.0" "praw" \
--replace "sqlalchemy<1.4" "sqlalchemy"
'';
2020-08-17 13:58:14 +01:00
checkInputs = [ pytestCheckHook ];
2020-08-17 13:58:14 +01:00
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 = "http://sopel.chat";
license = licenses.efl20;
maintainers = with maintainers; [ mog ];
};
}