2021-08-05 21:33:18 +00:00
|
|
|
{ lib
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, curio
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flask
|
|
|
|
, httpcore
|
|
|
|
, httpx
|
2021-12-26 17:43:05 +00:00
|
|
|
, hypercorn
|
2021-08-05 21:33:18 +00:00
|
|
|
, pytest-asyncio
|
|
|
|
, pytest-trio
|
|
|
|
, pytestCheckHook
|
|
|
|
, python-socks
|
|
|
|
, pythonOlder
|
|
|
|
, sniffio
|
2021-12-26 17:43:05 +00:00
|
|
|
, starlette
|
2021-08-05 21:33:18 +00:00
|
|
|
, trio
|
|
|
|
, yarl
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpx-socks";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.7.5";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romis2012";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-HwLJ2pScgiNmM/l14aKp47MMuGW1qSaIq7ujpCSRtqA=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
2022-05-18 14:49:53 +00:00
|
|
|
httpcore
|
2021-08-05 21:33:18 +00:00
|
|
|
python-socks
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
passthru.optional-dependencies = {
|
2022-11-27 09:42:12 +00:00
|
|
|
asyncio = [
|
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
trio = [
|
|
|
|
trio
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-05 21:33:18 +00:00
|
|
|
flask
|
2021-12-26 17:43:05 +00:00
|
|
|
hypercorn
|
2021-08-05 21:33:18 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-trio
|
|
|
|
pytestCheckHook
|
2021-12-26 17:43:05 +00:00
|
|
|
starlette
|
2021-08-05 21:33:18 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"httpx_socks"
|
|
|
|
];
|
2021-08-05 21:33:18 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests don't work in the sandbox
|
|
|
|
"test_proxy"
|
|
|
|
"test_secure_proxy"
|
|
|
|
];
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Proxy (HTTP, SOCKS) transports for httpx";
|
|
|
|
homepage = "https://github.com/romis2012/httpx-socks";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/romis2012/httpx-socks/releases/tag/v${version}";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|