1{ 2 lib, 3 anyio, 4 asgi-lifespan, 5 buildPythonPackage, 6 fastapi, 7 fetchFromGitHub, 8 httpx, 9 pdm-backend, 10 psutil, 11 pytest-asyncio, 12 pytestCheckHook, 13 pythonOlder, 14 requests, 15 starlette, 16 uvicorn, 17}: 18 19buildPythonPackage rec { 20 pname = "sse-starlette"; 21 version = "2.1.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.8"; 25 26 src = fetchFromGitHub { 27 owner = "sysid"; 28 repo = "sse-starlette"; 29 rev = "refs/tags/v${version}"; 30 hash = "sha256-gBkEs1jSKIOme2rbLf+pM3jFDgJkxyU92q+GsUsp8Eo="; 31 }; 32 33 build-system = [ pdm-backend ]; 34 35 dependencies = [ 36 anyio 37 starlette 38 uvicorn 39 ]; 40 41 nativeCheckInputs = [ 42 asgi-lifespan 43 fastapi 44 httpx 45 psutil 46 pytest-asyncio 47 pytestCheckHook 48 requests 49 ]; 50 51 pythonImportsCheck = [ "sse_starlette" ]; 52 53 disabledTests = [ 54 # AssertionError 55 "test_stop_server_with_many_consumers" 56 "test_stop_server_conditional" 57 ]; 58 59 meta = with lib; { 60 description = "Server Sent Events for Starlette and FastAPI"; 61 homepage = "https://github.com/sysid/sse-starlette"; 62 changelog = "https://github.com/sysid/sse-starlette/blob/${version}/CHANGELOG.md"; 63 license = licenses.bsd3; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}