python313Packages.mitmproxy-linux: 0.11.5 -> 0.12.3, remove things duplicated and in sync with mitmproxy-rs

Changelog: https://github.com/mitmproxy/mitmproxy_rs/blob/v0.12.3/CHANGELOG.md
This commit is contained in:
Sandro Jäckel
2025-05-01 18:08:21 +02:00
parent edbc7b288c
commit 10db73fe5f
@@ -2,23 +2,15 @@
lib,
buildPythonPackage,
bpf-linker,
fetchFromGitHub,
rustPlatform,
mitmproxy,
mitmproxy-rs,
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "mitmproxy-linux";
version = "0.11.5";
inherit (mitmproxy-rs) version src cargoDeps;
pyproject = true;
src = fetchFromGitHub {
owner = "mitmproxy";
repo = "mitmproxy_rs";
tag = "v${version}";
hash = "sha256-vC+Vsv7UWjkO+6lm7gAb91Ig04Y7r9gYQoz6R9xpxsA=";
};
postPatch = ''
substituteInPlace mitmproxy-linux/build.rs \
--replace-fail '"-Z",' "" \
@@ -28,11 +20,6 @@ buildPythonPackage rec {
--replace-fail 'build-std = ["core"]' ""
'';
cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-CFsefq1zQLIYjZcfoy3afYfP/0MlBoi9kVx7FVGEKr0=";
};
RUSTFLAGS = "-C target-feature=";
RUSTC_BOOTSTRAP = 1;
@@ -49,13 +36,13 @@ buildPythonPackage rec {
pythonImportsCheck = [ "mitmproxy_linux" ];
meta = {
description = "Rust bits in mitmproxy";
homepage = "https://github.com/mitmproxy/mitmproxy_rs/tree/main/mitmproxy-linux";
changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md#${
lib.replaceStrings [ "." ] [ "" ] version
}";
license = lib.licenses.mit;
inherit (mitmproxy.meta) maintainers;
};
meta =
{
inherit (mitmproxy-rs.meta) changelog license maintainers;
}
// {
description = "Linux Rust bits in mitmproxy";
homepage = "https://github.com/mitmproxy/mitmproxy_rs/tree/main/mitmproxy-linux";
platforms = lib.platforms.linux;
};
}