Files
nixpkgs/pkgs/development/python-modules/python-socks/default.nix
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00

72 lines
1.3 KiB
Nix

{
lib,
async-timeout,
buildPythonPackage,
curio,
fetchFromGitHub,
anyio,
flask,
pytest-asyncio,
pytest-trio,
pythonOlder,
pytestCheckHook,
setuptools,
trio,
trustme,
yarl,
}:
buildPythonPackage rec {
pname = "python-socks";
version = "2.7.3";
pyproject = true;
disabled = pythonOlder "3.6.2";
__darwinAllowLocalNetworking = true;
src = fetchFromGitHub {
owner = "romis2012";
repo = "python-socks";
tag = "v${version}";
hash = "sha256-n+RFHFGXy6/H3KwiK2kxY9KTe7PcYDcIoAYhnv7X62A=";
};
build-system = [ setuptools ];
dependencies = [
trio
curio
async-timeout
];
optional-dependencies = {
asyncio = lib.optionals (pythonOlder "3.11") [ async-timeout ];
trio = [ trio ];
curio = [ curio ];
anyio = [ anyio ];
};
doCheck = false; # requires tiny_proxy module
nativeCheckInputs = [
anyio
flask
pytest-asyncio
pytest-trio
pytestCheckHook
trustme
yarl
];
pythonImportsCheck = [ "python_socks" ];
meta = {
changelog = "https://github.com/romis2012/python-socks/releases/tag/${src.tag}";
description = "Core proxy client (SOCKS4, SOCKS5, HTTP) functionality for Python";
homepage = "https://github.com/romis2012/python-socks";
license = lib.licenses.asl20;
maintainers = [ ];
};
}