1{ 2 lib, 3 anyio, 4 buildPythonPackage, 5 fetchFromGitHub, 6 hatchling, 7 httpcore, 8 httpx, 9 pytestCheckHook, 10 pythonOlder, 11 starlette, 12 trio, 13 uvicorn, 14 wsproto, 15}: 16 17buildPythonPackage rec { 18 pname = "httpx-ws"; 19 version = "0.7.2"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "frankie567"; 26 repo = "httpx-ws"; 27 tag = "v${version}"; 28 hash = "sha256-ixaD7X6V/tUalZbYtic7D9lRqv8yGnwl+j5m832n/hQ="; 29 }; 30 31 # we don't need to use the hatch-regex-commit plugin 32 postPatch = '' 33 substituteInPlace pyproject.toml \ 34 --replace-fail 'source = "regex_commit"' "" \ 35 --replace-fail 'commit_extra_args = ["-e"]' "" \ 36 --replace-fail '"hatch-regex-commit"' "" \ 37 --replace-fail 'addopts = "--cov=httpx_ws/ --cov-report=term-missing"' "" 38 ''; 39 40 build-system = [ hatchling ]; 41 42 dependencies = [ 43 anyio 44 httpcore 45 httpx 46 wsproto 47 ]; 48 49 nativeCheckInputs = [ 50 pytestCheckHook 51 starlette 52 trio 53 uvicorn 54 ]; 55 56 pythonImportsCheck = [ "httpx_ws" ]; 57 58 disabledTestPaths = [ 59 # hang 60 "tests/test_api.py" 61 ]; 62 63 meta = with lib; { 64 description = "WebSocket support for HTTPX"; 65 homepage = "https://github.com/frankie567/httpx-ws"; 66 changelog = "https://github.com/frankie567/httpx-ws/releases/tag/v${version}"; 67 license = licenses.mit; 68 maintainers = [ ]; 69 }; 70}