emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / hypercorn / default.nix
blob26c134aa5e3039f196ac9558763a7bbb733d0be3
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   pythonOlder,
6   aioquic,
7   h11,
8   h2,
9   httpx,
10   priority,
11   trio,
12   uvloop,
13   wsproto,
14   poetry-core,
15   pytest-asyncio,
16   pytest-trio,
17   pytestCheckHook,
20 buildPythonPackage rec {
21   pname = "hypercorn";
22   version = "0.17.3";
23   pyproject = true;
25   disabled = pythonOlder "3.11"; # missing taskgroup dependency
27   src = fetchFromGitHub {
28     owner = "pgjones";
29     repo = "Hypercorn";
30     tag = version;
31     hash = "sha256-AtSMURz1rOr6VTQ7L2EQ4XZeKVEGTPXTbs3u7IhnZo8";
32   };
34   postPatch = ''
35     sed -i "/^addopts/d" pyproject.toml
36   '';
38   build-system = [ poetry-core ];
40   dependencies = [
41     h11
42     h2
43     priority
44     wsproto
45   ];
47   optional-dependencies = {
48     h3 = [ aioquic ];
49     trio = [ trio ];
50     uvloop = [ uvloop ];
51   };
53   nativeCheckInputs = [
54     httpx
55     pytest-asyncio
56     pytest-trio
57     pytestCheckHook
58   ] ++ lib.flatten (lib.attrValues optional-dependencies);
60   __darwinAllowLocalNetworking = true;
62   pythonImportsCheck = [ "hypercorn" ];
64   meta = with lib; {
65     changelog = "https://github.com/pgjones/hypercorn/blob/${src.tag}/CHANGELOG.rst";
66     homepage = "https://github.com/pgjones/hypercorn";
67     description = "ASGI web server inspired by Gunicorn";
68     mainProgram = "hypercorn";
69     license = licenses.mit;
70     maintainers = with maintainers; [ dgliwka ];
71   };