My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nomicon/pkgs/development/python-modules/httpx/default.nix

68 lines
1.2 KiB

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, brotli
, certifi
, h2
, httpcore
, rfc3986
, sniffio
, pytestCheckHook
, pytest-asyncio
, pytest-trio
, pytest-cov
, trustme
, uvicorn
}:
buildPythonPackage rec {
pname = "httpx";
version = "0.18.0";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "encode";
repo = pname;
rev = version;
sha256 = "sha256-6EYBTRXaVHBgW/JzZvWLz55AqgocOyym2FVtu2Nkp/U=";
};
propagatedBuildInputs = [
brotli
certifi
h2
httpcore
rfc3986
sniffio
];
checkInputs = [
pytestCheckHook
pytest-asyncio
pytest-trio
pytest-cov
trustme
uvicorn
];
pythonImportsCheck = [ "httpx" ];
disabledTests = [
# httpcore.ConnectError: [Errno 101] Network is unreachable
"test_connect_timeout"
# httpcore.ConnectError: [Errno -2] Name or service not known
"test_async_proxy_close"
"test_sync_proxy_close"
];
__darwinAllowLocalNetworking = true;
meta = with lib; {
description = "The next generation HTTP client";
homepage = "https://github.com/encode/httpx";
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}