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