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

63 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchPypi, isPyPy
, dnspython
, geoip2
, ipython
, praw
, pyenchant
, pygeoip
2020-08-17 12:58:14 +00:00
, pytestCheckHook
, pytz
2020-08-17 12:58:14 +00:00
, sqlalchemy
, xmltodict
}:
buildPythonPackage rec {
pname = "sopel";
2021-06-18 21:47:38 +00:00
version = "7.1.0";
disabled = isPyPy;
src = fetchPypi {
inherit pname version;
2021-06-18 21:47:38 +00:00
sha256 = "74057d4c86cff744b1f1062f3a9c4ae99eb4f1b17048ceb083293d5f4c7e989b";
};
propagatedBuildInputs = [
dnspython
geoip2
ipython
praw
pyenchant
pygeoip
pytz
2020-08-17 12:58:14 +00:00
sqlalchemy
xmltodict
];
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
postPatch = ''
substituteInPlace requirements.txt \
2020-08-17 12:58:14 +00:00
--replace "praw>=4.0.0,<6.0.0" "praw"
'';
2020-08-17 12:58:14 +00:00
checkInputs = [ pytestCheckHook ];
2020-08-17 12:58:14 +00: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 ];
};
}