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