nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at r-updates 70 lines 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 aioquic, 6 h11, 7 h2, 8 httpx, 9 priority, 10 trio, 11 uvloop, 12 wsproto, 13 pdm-backend, 14 pytest-asyncio, 15 pytest-trio, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "hypercorn"; 21 version = "0.18.0"; 22 pyproject = true; 23 24 src = fetchFromGitHub { 25 owner = "pgjones"; 26 repo = "Hypercorn"; 27 tag = version; 28 hash = "sha256-RNurpDq5Z3N9Wv9Hq/l6A3yKUriCCKx9BrbrWGwBsUk="; 29 }; 30 31 postPatch = '' 32 sed -i "/^addopts/d" pyproject.toml 33 ''; 34 35 build-system = [ pdm-backend ]; 36 37 dependencies = [ 38 h11 39 h2 40 priority 41 wsproto 42 ]; 43 44 optional-dependencies = { 45 h3 = [ aioquic ]; 46 trio = [ trio ]; 47 uvloop = [ uvloop ]; 48 }; 49 50 nativeCheckInputs = [ 51 httpx 52 pytest-asyncio 53 pytest-trio 54 pytestCheckHook 55 ] 56 ++ lib.concatAttrValues optional-dependencies; 57 58 __darwinAllowLocalNetworking = true; 59 60 pythonImportsCheck = [ "hypercorn" ]; 61 62 meta = { 63 changelog = "https://github.com/pgjones/hypercorn/blob/${src.tag}/CHANGELOG.rst"; 64 homepage = "https://github.com/pgjones/hypercorn"; 65 description = "ASGI web server inspired by Gunicorn"; 66 mainProgram = "hypercorn"; 67 license = lib.licenses.mit; 68 maintainers = with lib.maintainers; [ dgliwka ]; 69 }; 70}