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-02-10 20:34:41 +00:00
|
|
|
version = "0.7.3";
|
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;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "11wnhx9nfsg5lsnlgh33zngyhc2klichpfrkwajbbyq95fdqj8ri";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
async-timeout
|
|
|
|
curio
|
|
|
|
httpcore
|
|
|
|
httpx
|
|
|
|
python-socks
|
|
|
|
sniffio
|
|
|
|
trio
|
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|