587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
66 lines
1.2 KiB
Nix
66 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
anyio,
|
|
asgi-lifespan,
|
|
buildPythonPackage,
|
|
fastapi,
|
|
fetchFromGitHub,
|
|
httpx,
|
|
pdm-backend,
|
|
psutil,
|
|
pytest-asyncio,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
requests,
|
|
starlette,
|
|
uvicorn,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "sse-starlette";
|
|
version = "2.1.0";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "sysid";
|
|
repo = "sse-starlette";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-gBkEs1jSKIOme2rbLf+pM3jFDgJkxyU92q+GsUsp8Eo=";
|
|
};
|
|
|
|
build-system = [ pdm-backend ];
|
|
|
|
dependencies = [
|
|
anyio
|
|
starlette
|
|
uvicorn
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
asgi-lifespan
|
|
fastapi
|
|
httpx
|
|
psutil
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
requests
|
|
];
|
|
|
|
pythonImportsCheck = [ "sse_starlette" ];
|
|
|
|
disabledTests = [
|
|
# AssertionError
|
|
"test_stop_server_with_many_consumers"
|
|
"test_stop_server_conditional"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Server Sent Events for Starlette and FastAPI";
|
|
homepage = "https://github.com/sysid/sse-starlette";
|
|
changelog = "https://github.com/sysid/sse-starlette/blob/${version}/CHANGELOG.md";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|