1{
2 aiohttp,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 lib,
7 pytest-aiohttp,
8 pytest-cov-stub,
9 pytestCheckHook,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "aiohttp-sse";
15 version = "2.2.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "aio-libs";
20 repo = "aiohttp-sse";
21 tag = "v${version}";
22 hash = "sha256-iCjWuECUQukCtlQPjztEwawqSzd3LvvWRGXnhZem22w=";
23 };
24
25 patches = [
26 (fetchpatch {
27 name = "pytest-asyncio-compat.patch";
28 url = "https://github.com/aio-libs/aiohttp-sse/commit/22c8041f5f737f76bdba2f2fded58abacf04c913.patch";
29 hash = "sha256-CZjXgDKbm3XmS0tn3MGZMnZ84ZLt4o6v9boAYXYa6A4=";
30 })
31 ];
32
33 build-system = [ setuptools ];
34
35 dependencies = [
36 aiohttp
37 ];
38
39 pythonImportsCheck = [ "aiohttp_sse" ];
40
41 nativeCheckInputs = [
42 pytest-aiohttp
43 pytest-cov-stub
44 pytestCheckHook
45 ];
46
47 __darwinAllowLocalNetworking = true;
48
49 meta = {
50 changelog = "https://github.com/aio-libs/aiohttp-sse/blob/${src.tag}/CHANGES.rst";
51 description = "Server-sent events support for aiohttp";
52 homepage = "https://github.com/aio-libs/aiohttp-sse";
53 license = lib.licenses.asl20;
54 maintainers = with lib.maintainers; [ dotlambda ];
55 };
56}