Files
nixpkgs/pkgs/development/python-modules/proxy-py/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

96 lines
1.7 KiB
Nix

{
lib,
bash,
buildPythonPackage,
fetchFromGitHub,
gnumake,
h2,
hpack,
httpx,
hyperframe,
openssl,
paramiko,
pytest-asyncio,
pytest-cov-stub,
pytest-mock,
pytest-xdist,
pytestCheckHook,
pythonOlder,
requests,
setuptools-scm,
typing-extensions,
}:
buildPythonPackage rec {
pname = "proxy-py";
version = "2.4.10";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "abhinavsingh";
repo = "proxy.py";
tag = "v${version}";
hash = "sha256-47Qt8J60QFfHUSquD17xMfl+wBTsSimaPSRvS/sSPMI=";
};
postPatch = ''
substituteInPlace Makefile \
--replace "SHELL := /bin/bash" "SHELL := ${bash}/bin/bash"
'';
build-system = [ setuptools-scm ];
dependencies = [
paramiko
typing-extensions
];
nativeCheckInputs = [
gnumake
h2
hpack
httpx
hyperframe
openssl
pytest-asyncio
pytest-cov-stub
pytest-mock
pytest-xdist
pytestCheckHook
requests
];
__darwinAllowLocalNetworking = true;
preCheck = ''
export HOME=$(mktemp -d);
'';
disabledTests = [
# Test requires network access
"http"
"http2"
"proxy"
"web_server"
# Location is not writable
"test_gen_csr"
"test_gen_public_key"
# Tests run into a timeout
"integration"
# Crashes
"test_grout"
];
pythonImportsCheck = [ "proxy" ];
meta = {
description = "Python proxy framework";
homepage = "https://github.com/abhinavsingh/proxy.py";
changelog = "https://github.com/abhinavsingh/proxy.py/releases/tag/${src.tag}";
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ fab ];
};
}