2021-05-19 15:40:54 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
2022-11-12 23:33:11 +00:00
|
|
|
fetchFromGitHub,
|
2021-05-19 15:40:54 +00:00
|
|
|
pythonOlder,
|
2024-04-20 19:31:02 +00:00
|
|
|
exceptiongroup,
|
|
|
|
h11,
|
2021-05-19 15:40:54 +00:00
|
|
|
h2,
|
|
|
|
priority,
|
2024-04-20 19:31:02 +00:00
|
|
|
wsproto,
|
2022-02-06 18:52:32 +00:00
|
|
|
poetry-core,
|
2021-05-19 15:40:54 +00:00
|
|
|
pytest-asyncio,
|
|
|
|
pytest-trio,
|
|
|
|
pytestCheckHook,
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2024-03-12 20:52:13 +00:00
|
|
|
pname = "hypercorn";
|
2024-04-20 19:31:02 +00:00
|
|
|
version = "0.16.0";
|
2022-02-06 18:52:32 +00:00
|
|
|
format = "pyproject";
|
2021-05-19 15:40:54 +00:00
|
|
|
|
2024-04-20 19:31:02 +00:00
|
|
|
disabled = pythonOlder "3.11"; # missing taskgroup dependency
|
|
|
|
|
2022-11-12 23:33:11 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-05-19 15:40:54 +00:00
|
|
|
owner = "pgjones";
|
2024-03-12 20:52:13 +00:00
|
|
|
repo = "Hypercorn";
|
2021-05-19 15:40:54 +00:00
|
|
|
rev = version;
|
2024-04-20 19:31:02 +00:00
|
|
|
hash = "sha256-pIUZCQmC3c6FiV0iMMwJGs9TMi6B/YM+vaSx//sAmKE=";
|
2021-05-19 15:40:54 +00:00
|
|
|
};
|
|
|
|
|
2022-11-12 23:33:11 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i "/^addopts/d" pyproject.toml
|
|
|
|
'';
|
|
|
|
|
2024-04-20 19:31:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
2022-02-06 18:52:32 +00:00
|
|
|
|
2024-04-20 19:31:02 +00:00
|
|
|
dependencies = [
|
|
|
|
exceptiongroup
|
|
|
|
h11
|
|
|
|
h2
|
|
|
|
priority
|
|
|
|
wsproto
|
|
|
|
];
|
2021-05-19 15:40:54 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-19 15:40:54 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-trio
|
|
|
|
pytestCheckHook
|
2024-04-20 19:31:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/pgjones/hypercorn/issues/217
|
|
|
|
"test_startup_failure"
|
|
|
|
];
|
2021-05-19 15:40:54 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "hypercorn" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-11-12 23:33:11 +00:00
|
|
|
homepage = "https://github.com/pgjones/hypercorn";
|
2021-05-19 15:40:54 +00:00
|
|
|
description = "ASGI web server inspired by Gunicorn";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "hypercorn";
|
2021-05-19 15:40:54 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dgliwka ];
|
|
|
|
};
|
|
|
|
}
|