Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 setuptools-scm, 7 wheel, 8 httpx, 9 pytest-asyncio, 10 pytestCheckHook, 11 sse-starlette, 12}: 13 14buildPythonPackage rec { 15 pname = "httpx-sse"; 16 version = "0.4.0"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "florimondmanca"; 21 repo = "httpx-sse"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-nU8vkmV/WynzQrSrq9+FQXtfAJPVLpMsRSuntU0HWrE="; 24 }; 25 26 # pytest-cov configuration is not necessary for packaging 27 postPatch = '' 28 rm setup.cfg 29 ''; 30 31 build-system = [ 32 setuptools 33 setuptools-scm 34 wheel 35 ]; 36 37 dependencies = [ httpx ]; 38 39 pythonImportsCheck = [ "httpx_sse" ]; 40 41 nativeCheckInputs = [ 42 pytest-asyncio 43 pytestCheckHook 44 sse-starlette 45 ]; 46 47 meta = with lib; { 48 description = "Consume Server-Sent Event (SSE) messages with HTTPX"; 49 homepage = "https://github.com/florimondmanca/httpx-sse"; 50 changelog = "https://github.com/florimondmanca/httpx-sse/blob/${src.rev}/CHANGELOG.md"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ natsukium ]; 53 }; 54}