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