{ lib , buildPythonPackage , fetchFromGitHub , pytestCheckHook , pythonOlder , rustPlatform , setuptools-rust }: buildPythonPackage rec { pname = "mitmproxy-wireguard"; version = "0.1.19"; format = "pyproject"; disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "decathorpe"; repo = "mitmproxy_wireguard"; rev = "refs/tags/${version}"; hash = "sha256-6LgA8IaUCfScEr+tEG5lkt0MnWoA9Iab4kAseUvZFFo="; }; nativeBuildInputs = [ setuptools-rust ] ++ (with rustPlatform; [ cargoSetupHook maturinBuildHook ]); cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; hash = "sha256-wuroElBc0LQL0gf+P6Nffv3YsyDJliXksZCgcBfK0iw="; }; # 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 ]; }; }