nixpkgs/pkgs/development/python-modules/hypercorn/default.nix
Martin Weinelt 8ea6bde88d
treewide: prune pythonOlder 3.10/3.11
This is a post 3.10 removal cleanup.
2026-02-15 04:33:54 +01:00

71 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
aioquic,
cacert,
h11,
h2,
httpx,
priority,
trio,
uvloop,
wsproto,
poetry-core,
pytest-asyncio,
pytest-trio,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "hypercorn";
version = "0.17.3";
pyproject = true;
src = fetchFromGitHub {
owner = "pgjones";
repo = "Hypercorn";
tag = version;
hash = "sha256-AtSMURz1rOr6VTQ7L2EQ4XZeKVEGTPXTbs3u7IhnZo8";
};
postPatch = ''
sed -i "/^addopts/d" pyproject.toml
'';
build-system = [ poetry-core ];
dependencies = [
h11
h2
priority
wsproto
];
optional-dependencies = {
h3 = [ aioquic ];
trio = [ trio ];
uvloop = [ uvloop ];
};
nativeCheckInputs = [
httpx
pytest-asyncio
pytest-trio
pytestCheckHook
]
++ lib.concatAttrValues optional-dependencies;
__darwinAllowLocalNetworking = true;
pythonImportsCheck = [ "hypercorn" ];
meta = {
changelog = "https://github.com/pgjones/hypercorn/blob/${src.tag}/CHANGELOG.rst";
homepage = "https://github.com/pgjones/hypercorn";
description = "ASGI web server inspired by Gunicorn";
mainProgram = "hypercorn";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dgliwka ];
};
}