mitmproxy: 9.0.1 -> 10.1.1

Also add the new mitmproxy-rs dependency, which seemingly replaces mitmproxy-wireguard.
This commit is contained in:
K900 2023-10-29 20:58:37 +03:00
parent b9d8a730e3
commit 2540af169e
4 changed files with 2821 additions and 10 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, rustPlatform
, darwin
}:
buildPythonPackage rec {
pname = "mitmproxy-rs";
version = "0.3.11";
pyproject = true;
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "mitmproxy_rs";
rev = version;
hash = "sha256-V6LUr1jJiTo0+53jipkTyzG5JSw6uHaS6ziyBaFbETw=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"internet-packet-0.1.0" = "sha256-VtEuCE1sulBIFVymh7YW7VHCuIBjtb6tHoPz2tjxX+Q=";
};
};
buildAndTestSubdir = "mitmproxy-rs";
nativeBuildInputs = [
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
];
pythonImportsCheck = [ "mitmproxy_rs" ];
meta = with lib; {
description = "The Rust bits in mitmproxy";
homepage = " https://github.com/mitmproxy/mitmproxy_rs";
changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
platforms = platforms.all;
};
}

View File

@ -3,6 +3,7 @@
, buildPythonPackage
, pythonOlder
# Mitmproxy requirements
, aioquic
, asgiref
, blinker
, brotli
@ -14,7 +15,7 @@
, hyperframe
, kaitaistruct
, ldap3
, mitmproxy-wireguard
, mitmproxy-rs
, msgpack
, passlib
, protobuf
@ -41,19 +42,20 @@
buildPythonPackage rec {
pname = "mitmproxy";
version = "9.0.1";
version = "10.1.1";
disabled = pythonOlder "3.9";
pyproject = true;
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "mitmproxy";
rev = "refs/tags/${version}";
hash = "sha256-CINKvRnBspciS+wefJB8gzBE13L8CjbYCkmLmTTeYlA=";
hash = "sha256-/ouMj7UVowvzwjOuusgVfXjvjNPKpuJUuoJf6Sl9P44=";
};
propagatedBuildInputs = [
setuptools
# setup.py
aioquic
asgiref
blinker
brotli
@ -65,7 +67,7 @@ buildPythonPackage rec {
hyperframe
kaitaistruct
ldap3
mitmproxy-wireguard
mitmproxy-rs
msgpack
passlib
protobuf
@ -91,11 +93,6 @@ buildPythonPackage rec {
requests
];
postPatch = ''
# remove dependency constraints
sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?\( \?, \?!=\([0-9]\.\?\)\+\)\?//' -i setup.py
'';
__darwinAllowLocalNetworking = true;
preCheck = ''

View File

@ -6856,6 +6856,8 @@ self: super: with self; {
mitmproxy = callPackage ../development/python-modules/mitmproxy { };
mitmproxy-rs = callPackage ../development/python-modules/mitmproxy-rs { };
mitmproxy-wireguard = callPackage ../development/python-modules/mitmproxy-wireguard { };
mitogen = callPackage ../development/python-modules/mitogen { };