mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 19:02:57 +00:00
mitmproxy: 9.0.1 -> 10.1.1
Also add the new mitmproxy-rs dependency, which seemingly replaces mitmproxy-wireguard.
This commit is contained in:
parent
b9d8a730e3
commit
2540af169e
2763
pkgs/development/python-modules/mitmproxy-rs/Cargo.lock
generated
Normal file
2763
pkgs/development/python-modules/mitmproxy-rs/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
49
pkgs/development/python-modules/mitmproxy-rs/default.nix
Normal file
49
pkgs/development/python-modules/mitmproxy-rs/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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 = ''
|
||||
|
@ -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 { };
|
||||
|
Loading…
Reference in New Issue
Block a user