depot/third_party/nixpkgs/pkgs/development/python-modules/sopel/default.nix
Default email e0d1b75f19 Project import generated by Copybara.
GitOrigin-RevId: fe01052444c1d66ed6ef76df2af798c9769e9e79
2021-08-10 22:31:46 +08:00

63 lines
1.1 KiB
Nix

{ lib, buildPythonPackage, fetchPypi, isPyPy
, dnspython
, geoip2
, ipython
, praw
, pyenchant
, pygeoip
, pytestCheckHook
, pytz
, sqlalchemy
, xmltodict
}:
buildPythonPackage rec {
pname = "sopel";
version = "7.1.2";
disabled = isPyPy;
src = fetchPypi {
inherit pname version;
sha256 = "sha256-8RhIw3Qt0BclH1Ws16JNuFfwiRxJ14lM6MBUK9OvNKA=";
};
propagatedBuildInputs = [
dnspython
geoip2
ipython
praw
pyenchant
pygeoip
pytz
sqlalchemy
xmltodict
];
# remove once https://github.com/sopel-irc/sopel/pull/1653 lands
postPatch = ''
substituteInPlace requirements.txt \
--replace "praw>=4.0.0,<6.0.0" "praw" \
--replace "sqlalchemy<1.4" "sqlalchemy"
'';
checkInputs = [ pytestCheckHook ];
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 ];
};
}