2022-11-02 22:02:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-02-09 11:40:11 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2022-11-02 22:02:43 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, rustPlatform
|
|
|
|
, setuptools-rust
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mitmproxy-wireguard";
|
2023-04-12 12:48:02 +00:00
|
|
|
version = "0.1.23";
|
2022-11-02 22:02:43 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "decathorpe";
|
|
|
|
repo = "mitmproxy_wireguard";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-z9ucTBLLRXc1lcHA0r1wUleoP8X7yIlHrtdZdLD9qJk=";
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.libiconv
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-rust
|
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
]);
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2023-04-12 12:48:02 +00:00
|
|
|
hash = "sha256-qgyAaUpyuWVYMxUA4Gg8inlUMlSLo++16+nVvmDMhTQ=";
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# Module has no tests, only a test client
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"mitmproxy_wireguard"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "WireGuard frontend for mitmproxy";
|
|
|
|
homepage = "https://github.com/decathorpe/mitmproxy_wireguard";
|
|
|
|
changelog = "https://github.com/decathorpe/mitmproxy_wireguard/releases/tag/${version}";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|