Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / mitmproxy-rs / default.nix
blobfe7fb4c178e0540bbef992c5702fee115f97a0b6
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , fetchFromGitHub
5 , rustPlatform
6 , darwin
7 , libiconv
8 , mitmproxy-macos
9 }:
11 buildPythonPackage rec {
12   pname = "mitmproxy-rs";
13   version = "0.5.1";
14   pyproject = true;
16   src = fetchFromGitHub {
17     owner = "mitmproxy";
18     repo = "mitmproxy_rs";
19     rev = version;
20     hash = "sha256-nrm1T2yaGVmYsubwNJHPnPDC/A/jYiKVzwBKmuc9MD4=";
21   };
23   cargoDeps = rustPlatform.importCargoLock {
24     lockFile = ./Cargo.lock;
25   };
27   buildAndTestSubdir = "mitmproxy-rs";
29   nativeBuildInputs = [
30     rustPlatform.cargoSetupHook
31     rustPlatform.maturinBuildHook
32   ];
34   buildInputs = lib.optionals stdenv.isDarwin [
35     darwin.apple_sdk.frameworks.Security
36     libiconv
37     mitmproxy-macos
38   ];
40   pythonImportsCheck = [ "mitmproxy_rs" ];
42   meta = with lib; {
43     description = "The Rust bits in mitmproxy";
44     homepage = "https://github.com/mitmproxy/mitmproxy_rs";
45     changelog = "https://github.com/mitmproxy/mitmproxy_rs/blob/${src.rev}/CHANGELOG.md";
46     license = licenses.mit;
47     maintainers = with maintainers; [ fab ];
48   };