Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 67 lines 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, brotli 6, certifi 7, h2 8, httpcore 9, rfc3986 10, sniffio 11, pytestCheckHook 12, pytest-asyncio 13, pytest-trio 14, pytestcov 15, trustme 16, uvicorn 17}: 18 19buildPythonPackage rec { 20 pname = "httpx"; 21 version = "0.18.0"; 22 disabled = pythonOlder "3.6"; 23 24 src = fetchFromGitHub { 25 owner = "encode"; 26 repo = pname; 27 rev = version; 28 sha256 = "sha256-6EYBTRXaVHBgW/JzZvWLz55AqgocOyym2FVtu2Nkp/U="; 29 }; 30 31 propagatedBuildInputs = [ 32 brotli 33 certifi 34 h2 35 httpcore 36 rfc3986 37 sniffio 38 ]; 39 40 checkInputs = [ 41 pytestCheckHook 42 pytest-asyncio 43 pytest-trio 44 pytestcov 45 trustme 46 uvicorn 47 ]; 48 49 pythonImportsCheck = [ "httpx" ]; 50 51 disabledTests = [ 52 # httpcore.ConnectError: [Errno 101] Network is unreachable 53 "test_connect_timeout" 54 # httpcore.ConnectError: [Errno -2] Name or service not known 55 "test_async_proxy_close" 56 "test_sync_proxy_close" 57 ]; 58 59 __darwinAllowLocalNetworking = true; 60 61 meta = with lib; { 62 description = "The next generation HTTP client"; 63 homepage = "https://github.com/encode/httpx"; 64 license = licenses.bsd3; 65 maintainers = [ maintainers.costrouc ]; 66 }; 67}