Merge pull request #205027 from SuperSandro2000/mitmproxy

This commit is contained in:
Sandro 2022-12-08 15:05:00 +01:00 committed by GitHub
commit 8ae8a3769e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,5 @@
{ lib
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, pythonOlder
# Mitmproxy requirements
@ -8,7 +7,6 @@
, blinker
, brotli
, certifi
, click
, cryptography
, flask
, h11
@ -16,6 +14,7 @@
, hyperframe
, kaitaistruct
, ldap3
, mitmproxy-wireguard
, msgpack
, passlib
, protobuf
@ -42,24 +41,16 @@
buildPythonPackage rec {
pname = "mitmproxy";
version = "8.1.1";
disabled = pythonOlder "3.8";
version = "9.0.1";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = pname;
repo = pname;
owner = "mitmproxy";
repo = "mitmproxy";
rev = "refs/tags/v${version}";
sha256 = "sha256-nW/WfiY6uF67qNa95tvNvSv/alP2WmzTk34LEBma/04=";
};
patches = [
# Fix onboarding addon tests failing with Flask >= v2.2
(fetchpatch {
url = "https://github.com/mitmproxy/mitmproxy/commit/bc370276a19c1d1039e7a45ecdc23c362626c81a.patch";
hash = "sha256-Cp7RnYpZEuRhlWYOk8BOnAKBAUa7Vy296UmQi3/ufes=";
})
];
propagatedBuildInputs = [
setuptools
# setup.py
@ -67,7 +58,6 @@ buildPythonPackage rec {
blinker
brotli
certifi
click
cryptography
flask
h11
@ -75,11 +65,12 @@ buildPythonPackage rec {
hyperframe
kaitaistruct
ldap3
mitmproxy-wireguard
msgpack
passlib
protobuf
publicsuffix2
pyopenssl
publicsuffix2
pyparsing
pyperclip
ruamel-yaml
@ -120,6 +111,12 @@ buildPythonPackage rec {
# ValueError: Exceeds the limit (4300) for integer string conversion
"test_roundtrip_big_integer"
];
disabledTestPaths = [
# teardown of half the tests broken
"test/mitmproxy/addons/test_onboarding.py"
];
dontUsePytestXdist = true;
pythonImportsCheck = [ "mitmproxy" ];