567e8dfd8e
This commit was created by a combination of scripts and tools: - an ast-grep script to prefix things in meta with `lib.`, - a modified nixf-diagnose / nixf combination to remove unused `with lib;`, and - regular nixfmt. Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
78 lines
1.4 KiB
Nix
78 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
async-timeout,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
flask,
|
|
httpcore,
|
|
httpx,
|
|
hypercorn,
|
|
pytest-asyncio,
|
|
pytest-trio,
|
|
pytestCheckHook,
|
|
python-socks,
|
|
setuptools,
|
|
starlette,
|
|
tiny-proxy,
|
|
trio,
|
|
trustme,
|
|
yarl,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "httpx-socks";
|
|
version = "0.11.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "romis2012";
|
|
repo = "httpx-socks";
|
|
tag = "v${version}";
|
|
hash = "sha256-/8nz/5LqEuSr8A8/BWzJM9vHuum6fOYIS2rozr4Omi4=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
httpx
|
|
httpcore
|
|
python-socks
|
|
]
|
|
++ python-socks.optional-dependencies.asyncio;
|
|
|
|
optional-dependencies = {
|
|
asyncio = [ async-timeout ];
|
|
trio = [ trio ];
|
|
};
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
nativeCheckInputs = [
|
|
flask
|
|
hypercorn
|
|
pytest-asyncio
|
|
pytest-trio
|
|
pytestCheckHook
|
|
starlette
|
|
tiny-proxy
|
|
trustme
|
|
yarl
|
|
];
|
|
|
|
pythonImportsCheck = [ "httpx_socks" ];
|
|
|
|
disabledTests = [
|
|
# Tests don't work in the sandbox
|
|
"test_proxy"
|
|
"test_secure_proxy"
|
|
];
|
|
|
|
meta = {
|
|
description = "Proxy (HTTP, SOCKS) transports for httpx";
|
|
homepage = "https://github.com/romis2012/httpx-socks";
|
|
changelog = "https://github.com/romis2012/httpx-socks/releases/tag/${src.tag}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
};
|
|
}
|