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-06-16 17:23:12 +00:00
|
|
|
version = "0.7.4";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romis2012";
|
|
|
|
repo = pname;
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
sha256 = "sha256-+eWGmCHkXQA+JaEgofqUeFyGyMxSctal+jsqsShFM58=";
|
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-05-18 14:49:53 +00:00
|
|
|
asyncio = [ async-timeout ];
|
|
|
|
trio = [ trio ];
|
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
checkInputs = [
|
|
|
|
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";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|