Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.2 kB · 52 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{ lib, buildPythonPackage, bpf-linker, rustPlatform, mitmproxy-rs,}:
buildPythonPackage { pname = "mitmproxy-linux"; inherit (mitmproxy-rs) version src cargoDeps; pyproject = true;
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"]' ""
cp ${./fix-mitmproxy-linux-redirector-path.diff} tmp.diff substituteInPlace tmp.diff \ --replace-fail @mitmproxy-linux-redirector@ $out/bin/mitmproxy-linux-redirector patch -p1 < tmp.diff '';
RUSTFLAGS = "-C target-feature="; RUSTC_BOOTSTRAP = 1;
buildAndTestSubdir = "mitmproxy-linux";
nativeBuildInputs = [ bpf-linker rustPlatform.cargoSetupHook rustPlatform.maturinBuildHook ];
# repo has no python tests doCheck = false;
pythonImportsCheck = [ "mitmproxy_linux" ];
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; };}