Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions pkgs/development/python-modules/mitmproxy-linux/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
lib,
buildPythonPackage,
bpf-linker,
fetchFromGitHub,
rustPlatform,
mitmproxy,
}:

buildPythonPackage rec {
pname = "mitmproxy-linux";
version = "0.11.5";
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",' "" \
--replace-fail '"build-std=core",' ""

substituteInPlace mitmproxy-linux-ebpf/.cargo/config.toml \
--replace-fail 'build-std = ["core"]' ""
'';

cargoDeps = rustPlatform.fetchCargoVendor {
inherit pname version src;
hash = "sha256-CFsefq1zQLIYjZcfoy3afYfP/0MlBoi9kVx7FVGEKr0=";
};

RUSTFLAGS = "-C target-feature=";
RUSTC_BOOTSTRAP = 1;

buildAndTestSubdir = "mitmproxy-linux";

nativeBuildInputs = [
bpf-linker
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
];

# repo has no python tests
doCheck = false;
Comment thread
SuperSandro2000 marked this conversation as resolved.
Outdated

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;
};
}
10 changes: 5 additions & 5 deletions pkgs/development/python-modules/mitmproxy-macos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
}:

buildPythonPackage rec {
pname = "mitmproxy-macos";
version = "0.9.2";
version = "0.11.5";
format = "wheel";

disabled = pythonOlder "3.10";

src = fetchPypi {
pname = "mitmproxy_macos";
inherit version;
format = "wheel";
dist = "py3";
python = "py3";
hash = "sha256-Q19gQF6qnoF0TDmeZIxu90A5/ur7N7sDcoeBi2LaNrg=";
hash = "sha256-j3qqZGrMZLpHkKf01Gy5+/18sEEbm3pWfbBASGS/8o0=";
};

# repo has no python tests
doCheck = false;
Comment thread
SuperSandro2000 marked this conversation as resolved.
Outdated

pythonImportsCheck = [ "mitmproxy_macos" ];

meta = with lib; {
Expand Down
Loading