1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pythonOlder 5, anyio 6, asyncio-rlock 7, asyncio-throttle 8, dataclasses 9, ircstates 10, async_stagger 11, async-timeout 12, python 13}: 14 15buildPythonPackage rec { 16 pname = "ircrobots"; 17 version = "0.4.6"; 18 disabled = pythonOlder "3.6"; 19 20 src = fetchFromGitHub { 21 owner = "jesopo"; 22 repo = pname; 23 rev = "v${version}"; 24 sha256 = "sha256-+BrS1+ZkgwT/qvqD0PwRZi2LF+31biS738SzKH1dy7w="; 25 }; 26 27 postPatch = '' 28 # too specific pins https://github.com/jesopo/ircrobots/issues/3 29 sed -iE 's/anyio.*/anyio/' requirements.txt 30 sed -iE 's/ircstates.*/ircstates/' requirements.txt 31 sed -iE 's/async_timeout.*/async_timeout/' requirements.txt 32 ''; 33 34 propagatedBuildInputs = [ 35 anyio 36 asyncio-rlock 37 asyncio-throttle 38 ircstates 39 async_stagger 40 async-timeout 41 ] ++ lib.optionals (pythonOlder "3.7") [ 42 dataclasses 43 ]; 44 45 checkPhase = '' 46 ${python.interpreter} -m unittest test 47 ''; 48 49 pythonImportsCheck = [ "ircrobots" ]; 50 51 meta = with lib; { 52 description = "Asynchronous bare-bones IRC bot framework for python3"; 53 license = licenses.mit; 54 homepage = "https://github.com/jesopo/ircrobots"; 55 maintainers = with maintainers; [ hexa ]; 56 }; 57}