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