1{ lib
2, buildPythonPackage
3, chardet
4, cryptography
5, feedparser
6, fetchPypi
7, mock
8, pysocks
9, pytestCheckHook
10, python-dateutil
11, python-gnupg
12, pythonOlder
13, pytz
14}:
15
16buildPythonPackage rec {
17 pname = "limnoria";
18 version = "2023.9.24";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.6";
22
23 src = fetchPypi {
24 inherit pname version;
25 hash = "sha256-VJXIuGcgwAEObCCah+yc/o3IEpe4ln5F4wVwCy54Auc=";
26 };
27
28 propagatedBuildInputs = [
29 chardet
30 cryptography
31 feedparser
32 mock
33 pysocks
34 python-dateutil
35 python-gnupg
36 ] ++ lib.optionals (pythonOlder "3.9") [
37 pytz
38 ];
39
40 nativeCheckInputs = [
41 pytestCheckHook
42 ];
43
44 postPatch = ''
45 substituteInPlace setup.py \
46 --replace "version=version" 'version="${version}"'
47 '';
48
49 checkPhase = ''
50 runHook preCheck
51 export PATH="$PATH:$out/bin";
52 supybot-test test -v --no-network
53 runHook postCheck
54 '';
55
56 pythonImportsCheck = [
57 # Uses the same names as Supybot
58 "supybot"
59 ];
60
61 meta = with lib; {
62 description = "A modified version of Supybot, an IRC bot";
63 homepage = "https://github.com/ProgVal/Limnoria";
64 license = licenses.bsd3;
65 maintainers = with maintainers; [ goibhniu ];
66 };
67}