1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 anyio,
7 asyncio-rlock,
8 asyncio-throttle,
9 ircstates,
10 async-stagger,
11 async-timeout,
12 python,
13}:
14
15buildPythonPackage rec {
16 pname = "ircrobots";
17 version = "0.6.6";
18 format = "setuptools";
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "jesopo";
23 repo = pname;
24 rev = "v${version}";
25 hash = "sha256-mIh3tERwHtGH9eA0AT8Lcnwp1Wn9lQhKkUjuZcOXO/c=";
26 };
27
28 postPatch = ''
29 # too specific pins https://github.com/jesopo/ircrobots/issues/3
30 sed -iE 's/anyio.*/anyio/' 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}