2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-01-03 16:56:52 +00:00
|
|
|
, chardet
|
|
|
|
, cryptography
|
|
|
|
, feedparser
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchPypi
|
2022-01-03 16:56:52 +00:00
|
|
|
, mock
|
|
|
|
, pysocks
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-dateutil
|
|
|
|
, python-gnupg
|
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "limnoria";
|
2022-09-30 11:47:45 +00:00
|
|
|
version = "2022.9.20";
|
2022-01-03 16:56:52 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-db+JKQXDffMm5dcyMVtYNj1YFKHSlvYAoyZi86tqoiA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
chardet
|
|
|
|
cryptography
|
|
|
|
feedparser
|
|
|
|
mock
|
|
|
|
pysocks
|
|
|
|
python-dateutil
|
|
|
|
python-gnupg
|
|
|
|
] ++ lib.optionals (pythonOlder "3.9") [
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
postPatch = ''
|
2022-01-03 16:56:52 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version=version" 'version="${version}"'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-01-03 16:56:52 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
export PATH="$PATH:$out/bin";
|
|
|
|
supybot-test test -v --no-network
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
# Uses the same names as Supybot
|
|
|
|
"supybot"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A modified version of Supybot, an IRC bot";
|
|
|
|
homepage = "https://github.com/ProgVal/Limnoria";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ goibhniu ];
|
|
|
|
};
|
|
|
|
}
|