2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
curio,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flask,
|
|
|
|
httpcore,
|
|
|
|
httpx,
|
|
|
|
hypercorn,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-trio,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-socks,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
sniffio,
|
|
|
|
starlette,
|
|
|
|
tiny-proxy,
|
|
|
|
trio,
|
|
|
|
trustme,
|
|
|
|
yarl,
|
2021-08-05 21:33:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "httpx-socks";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.9.1";
|
|
|
|
pyproject = true;
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-08-05 21:33:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romis2012";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "httpx-socks";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-9v5DfxEtM7jq+b8wR0M1klTSnSdFjQ4aDl8ZSZWxbFA=";
|
2021-08-05 21:33:18 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
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 = {
|
2024-06-05 15:53:02 +00:00
|
|
|
asyncio = [ async-timeout ];
|
|
|
|
trio = [ trio ];
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
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
|
2023-07-15 17:15:38 +00:00
|
|
|
tiny-proxy
|
|
|
|
trustme
|
2021-08-05 21:33:18 +00:00
|
|
|
yarl
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|