1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, anyio 6, h11 7, h2 8, pproxy 9, pytest-asyncio 10, pytestCheckHook 11, pytest-cov 12, sniffio 13, trio 14, trustme 15, uvicorn 16}: 17 18buildPythonPackage rec { 19 pname = "httpcore"; 20 version = "0.13.7"; 21 disabled = pythonOlder "3.6"; 22 23 src = fetchFromGitHub { 24 owner = "encode"; 25 repo = pname; 26 rev = version; 27 sha256 = "sha256-9hG9MqqEYMT2j7tXafToGYwHbJfp9/klNqZozHSbweE="; 28 }; 29 30 propagatedBuildInputs = [ 31 anyio 32 h11 33 h2 34 sniffio 35 ]; 36 37 checkInputs = [ 38 pproxy 39 pytest-asyncio 40 pytestCheckHook 41 pytest-cov 42 trio 43 trustme 44 uvicorn 45 ]; 46 47 disabledTestPaths = [ 48 # these tests fail during dns lookups: httpcore.ConnectError: [Errno -2] Name or service not known 49 "tests/test_threadsafety.py" 50 "tests/async_tests/" 51 "tests/sync_tests/test_interfaces.py" 52 "tests/sync_tests/test_retries.py" 53 ]; 54 55 pythonImportsCheck = [ "httpcore" ]; 56 57 meta = with lib; { 58 description = "A minimal low-level HTTP client"; 59 homepage = "https://github.com/encode/httpcore"; 60 license = licenses.bsd3; 61 maintainers = with maintainers; [ ris ]; 62 }; 63}