Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.4 kB · 80 lines
Nix
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081{ lib, anyio, buildPythonPackage, certifi, fetchFromGitHub, hatchling, hatch-fancy-pypi-readme, h11, h2, pproxy, pytest-asyncio, pytest-httpbin, pytest-trio, pytestCheckHook, pythonOlder, socksio, trio, # for passthru.tests httpx, httpx-socks, respx,}:
buildPythonPackage rec { pname = "httpcore"; version = "1.0.9"; pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub { owner = "encode"; repo = "httpcore"; tag = version; hash = "sha256-YtAbx0iXN7u8pMBXQBUydvAH6ilH+veklvxSh5EVFXo="; };
build-system = [ hatchling hatch-fancy-pypi-readme ];
dependencies = [ certifi h11 ];
optional-dependencies = { asyncio = [ anyio ]; http2 = [ h2 ]; socks = [ socksio ]; trio = [ trio ]; };
nativeCheckInputs = [ pproxy pytest-asyncio pytest-httpbin pytest-trio pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "httpcore" ];
__darwinAllowLocalNetworking = true;
passthru.tests = { inherit httpx httpx-socks respx; };
meta = with lib; { changelog = "https://github.com/encode/httpcore/blob/${version}/CHANGELOG.md"; description = "Minimal low-level HTTP client"; homepage = "https://github.com/encode/httpcore"; license = licenses.bsd3; maintainers = with maintainers; [ ris ]; };}