Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, certifi 6, chardet 7, h11 8, h2 9, httpcore 10, idna 11, rfc3986 12, sniffio 13, isPy27 14, pytest 15, pytest-asyncio 16, pytest-trio 17, pytestcov 18, trustme 19, uvicorn 20, brotli 21}: 22 23buildPythonPackage rec { 24 pname = "httpx"; 25 version = "0.14.2"; 26 disabled = isPy27; 27 28 src = fetchFromGitHub { 29 owner = "encode"; 30 repo = pname; 31 rev = version; 32 sha256 = "08b6k5g8car3bic90aw4ysb2zvsa5nm8qk3hk4dgamllnnxzl5br"; 33 }; 34 35 patches = [ 36 (fetchpatch { 37 name = "fix-cookie-test-timestamp.patch"; 38 url = "https://github.com/encode/httpx/pull/1270.patch"; 39 sha256 = "1hgrynac6226sgnyzmsr1nr15rn49gbfmk4c2kx3dwkbh6vr7jpd"; 40 }) 41 ]; 42 43 propagatedBuildInputs = [ 44 certifi 45 chardet 46 h11 47 h2 48 httpcore 49 idna 50 rfc3986 51 sniffio 52 ]; 53 54 checkInputs = [ 55 pytest 56 pytest-asyncio 57 pytest-trio 58 pytestcov 59 trustme 60 uvicorn 61 brotli 62 ]; 63 64 checkPhase = '' 65 PYTHONPATH=.:$PYTHONPATH pytest -k 'not (test_connect_timeout or test_elapsed_timer)' 66 ''; 67 pythonImportsCheck = [ "httpx" ]; 68 69 meta = with lib; { 70 description = "The next generation HTTP client"; 71 homepage = "https://github.com/encode/httpx"; 72 license = licenses.bsd3; 73 maintainers = [ maintainers.costrouc ]; 74 }; 75}