Merge pull request #267280 from boltzmannrain/mitmproxy_macos

mitmproxy: fix macos build
This commit is contained in:
Weijia Wang 2023-11-18 17:06:33 +01:00 committed by GitHub
commit a45221f86a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 1 deletions

View file

@ -2477,6 +2477,12 @@
githubId = 50839;
name = "Brian Jones";
};
boltzmannrain = {
email = "boltzmannrain@gmail.com";
github = "boltzmannrain";
githubId = 150560585;
name = "Dmitry Ivankov";
};
booklearner = {
name = "booklearner";
email = "booklearner@proton.me";

View file

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
}:
buildPythonPackage rec {
pname = "mitmproxy-macos";
version = "0.3.11";
pyproject = true;
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "mitmproxy_rs";
rev = version;
hash = "sha256-V6LUr1jJiTo0+53jipkTyzG5JSw6uHaS6ziyBaFbETw=";
};
sourceRoot = "${src.name}/mitmproxy-macos";
pythonImportsCheck = [ "mitmproxy_macos" ];
nativeBuildInputs = [
hatchling
];
meta = with lib; {
description = "The MacOS Rust bits in mitmproxy";
homepage = "https://github.com/mitmproxy/mitmproxy_rs/tree/main/mitmproxy-macos";
changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ boltzmannrain ];
platforms = platforms.darwin;
};
}

View file

@ -4,6 +4,8 @@
, fetchFromGitHub
, rustPlatform
, darwin
, libiconv
, mitmproxy-macos
}:
buildPythonPackage rec {
@ -34,13 +36,15 @@ buildPythonPackage rec {
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
libiconv
mitmproxy-macos
];
pythonImportsCheck = [ "mitmproxy_rs" ];
meta = with lib; {
description = "The Rust bits in mitmproxy";
homepage = " https://github.com/mitmproxy/mitmproxy_rs";
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 ];

View file

@ -2,6 +2,7 @@
, fetchFromGitHub
, buildPythonPackage
, pythonOlder
, stdenv
# Mitmproxy requirements
, aioquic
, asgiref
@ -15,6 +16,7 @@
, hyperframe
, kaitaistruct
, ldap3
, mitmproxy-macos
, mitmproxy-rs
, msgpack
, passlib
@ -81,6 +83,8 @@ buildPythonPackage rec {
urwid
wsproto
zstandard
] ++ lib.optionals stdenv.isDarwin [
mitmproxy-macos
];
nativeCheckInputs = [

View file

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