83405b6dd2
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
77 lines
1.3 KiB
Nix
77 lines
1.3 KiB
Nix
{ lib
|
|
, async-timeout
|
|
, buildPythonPackage
|
|
, curio
|
|
, fetchFromGitHub
|
|
, flask
|
|
, httpcore
|
|
, httpx
|
|
, hypercorn
|
|
, pytest-asyncio
|
|
, pytest-trio
|
|
, pytestCheckHook
|
|
, python-socks
|
|
, pythonOlder
|
|
, sniffio
|
|
, starlette
|
|
, trio
|
|
, yarl
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "httpx-socks";
|
|
version = "0.7.5";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "romis2012";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-HwLJ2pScgiNmM/l14aKp47MMuGW1qSaIq7ujpCSRtqA=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
httpx
|
|
httpcore
|
|
python-socks
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
asyncio = [
|
|
async-timeout
|
|
];
|
|
trio = [
|
|
trio
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
flask
|
|
hypercorn
|
|
pytest-asyncio
|
|
pytest-trio
|
|
pytestCheckHook
|
|
starlette
|
|
yarl
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"httpx_socks"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Tests don't work in the sandbox
|
|
"test_proxy"
|
|
"test_secure_proxy"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Proxy (HTTP, SOCKS) transports for httpx";
|
|
homepage = "https://github.com/romis2012/httpx-socks";
|
|
changelog = "https://github.com/romis2012/httpx-socks/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|