1{ lib
2, buildPythonPackage
3, fetchFromGitLab
4, pythonOlder
5, typing-extensions
6, wsproto
7, toml
8, h2
9, priority
10, mock
11, pytest-asyncio
12, pytest-cov
13, pytest-sugar
14, pytest-trio
15, pytestCheckHook
16}:
17
18buildPythonPackage rec {
19 pname = "Hypercorn";
20 version = "0.11.2";
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitLab {
24 owner = "pgjones";
25 repo = pname;
26 rev = version;
27 sha256 = "0v80v6l2xqac5mgrmh2im7y23wpvz4yc2v4h9ryhvl88c2jk9mvh";
28 };
29
30 propagatedBuildInputs = [ wsproto toml h2 priority ]
31 ++ lib.optionals (pythonOlder "3.8") [ typing-extensions ];
32
33 checkInputs = [
34 pytest-asyncio
35 pytest-cov
36 pytest-sugar
37 pytest-trio
38 pytestCheckHook
39 ] ++ lib.optionals (pythonOlder "3.8") [ mock ];
40
41 pythonImportsCheck = [ "hypercorn" ];
42
43 meta = with lib; {
44 homepage = "https://pgjones.gitlab.io/hypercorn/";
45 description = "The ASGI web server inspired by Gunicorn";
46 license = licenses.mit;
47 maintainers = with maintainers; [ dgliwka ];
48 };
49}