summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/aiohttp-sse/default.nix
blob: 2db3993b8f7f18d430c14c742db4bebcaf275a65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  aiohttp,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  lib,
  pytest-aiohttp,
  pytest-cov-stub,
  pytestCheckHook,
  setuptools,
}:

buildPythonPackage rec {
  pname = "aiohttp-sse";
  version = "2.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "aio-libs";
    repo = "aiohttp-sse";
    tag = "v${version}";
    hash = "sha256-iCjWuECUQukCtlQPjztEwawqSzd3LvvWRGXnhZem22w=";
  };

  patches = [
    (fetchpatch {
      name = "pytest-asyncio-compat.patch";
      url = "https://github.com/aio-libs/aiohttp-sse/commit/22c8041f5f737f76bdba2f2fded58abacf04c913.patch";
      hash = "sha256-CZjXgDKbm3XmS0tn3MGZMnZ84ZLt4o6v9boAYXYa6A4=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    aiohttp
  ];

  pythonImportsCheck = [ "aiohttp_sse" ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytest-cov-stub
    pytestCheckHook
  ];

  __darwinAllowLocalNetworking = true;

  meta = {
    changelog = "https://github.com/aio-libs/aiohttp-sse/blob/${src.tag}/CHANGES.rst";
    description = "Server-sent events support for aiohttp";
    homepage = "https://github.com/aio-libs/aiohttp-sse";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}