2021-11-23 23:28:38 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
async-timeout,
|
|
|
|
buildPythonPackage,
|
|
|
|
curio,
|
|
|
|
fetchFromGitHub,
|
2022-12-30 20:13:42 +01:00
|
|
|
anyio,
|
2021-11-23 23:28:38 +01:00
|
|
|
flask,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-trio,
|
|
|
|
pythonOlder,
|
|
|
|
pytestCheckHook,
|
2024-09-30 11:48:59 +09:00
|
|
|
setuptools,
|
2021-11-23 23:28:38 +01:00
|
|
|
trio,
|
2022-12-30 20:13:42 +01:00
|
|
|
trustme,
|
2021-11-23 23:28:38 +01:00
|
|
|
yarl,
|
|
|
|
}:
|
2021-05-06 08:22:24 -07:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-socks";
|
2025-02-20 08:42:39 +00:00
|
|
|
version = "2.7.1";
|
2024-09-30 11:48:59 +09:00
|
|
|
pyproject = true;
|
2021-05-06 08:22:24 -07:00
|
|
|
|
2022-12-30 20:13:42 +01:00
|
|
|
disabled = pythonOlder "3.6.2";
|
2021-11-23 23:28:38 +01:00
|
|
|
|
2022-08-24 22:34:16 -04:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-11-23 23:28:38 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "romis2012";
|
2022-12-30 20:13:42 +01:00
|
|
|
repo = "python-socks";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = "v${version}";
|
2025-02-20 08:42:39 +00:00
|
|
|
hash = "sha256-7BfdyQDfRIPSC3Iv+cDcR0VFHX+l1OPRMElzHGL2x3M=";
|
2021-05-06 08:22:24 -07:00
|
|
|
};
|
|
|
|
|
2024-09-30 11:48:59 +09:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-11-23 23:28:38 +01:00
|
|
|
trio
|
|
|
|
curio
|
|
|
|
async-timeout
|
|
|
|
];
|
|
|
|
|
2024-09-30 11:47:50 +09:00
|
|
|
optional-dependencies = {
|
|
|
|
asyncio = lib.optionals (pythonOlder "3.11") [ async-timeout ];
|
|
|
|
trio = [ trio ];
|
|
|
|
curio = [ curio ];
|
|
|
|
anyio = [ anyio ];
|
|
|
|
};
|
|
|
|
|
2022-12-30 20:13:42 +01:00
|
|
|
doCheck = false; # requires tiny_proxy module
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-12-30 20:13:42 +01:00
|
|
|
anyio
|
2021-11-23 23:28:38 +01:00
|
|
|
flask
|
|
|
|
pytest-asyncio
|
|
|
|
pytest-trio
|
|
|
|
pytestCheckHook
|
2022-12-30 20:13:42 +01:00
|
|
|
trustme
|
2021-11-23 23:28:38 +01:00
|
|
|
yarl
|
|
|
|
];
|
2021-05-06 08:22:24 -07:00
|
|
|
|
2021-11-23 23:28:38 +01:00
|
|
|
pythonImportsCheck = [ "python_socks" ];
|
2021-05-06 08:22:24 -07:00
|
|
|
|
|
|
|
meta = with lib; {
|
2025-01-19 21:17:54 +01:00
|
|
|
changelog = "https://github.com/romis2012/python-socks/releases/tag/${src.tag}";
|
2021-05-06 08:22:24 -07:00
|
|
|
description = "Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python";
|
|
|
|
homepage = "https://github.com/romis2012/python-socks";
|
|
|
|
license = licenses.asl20;
|
2024-07-28 16:44:11 +02:00
|
|
|
maintainers = [ ];
|
2021-05-06 08:22:24 -07:00
|
|
|
};
|
|
|
|
}
|