1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, pytestCheckHook 5, pythonOlder 6, rustPlatform 7, setuptools-rust 8}: 9 10buildPythonPackage rec { 11 pname = "mitmproxy-wireguard"; 12 version = "0.1.18"; 13 format = "pyproject"; 14 15 disabled = pythonOlder "3.7"; 16 17 src = fetchFromGitHub { 18 owner = "decathorpe"; 19 repo = "mitmproxy_wireguard"; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-vDexI9ihZhisbtt7k9epYD3RjPUaUnEX1TuDQDHZO8A="; 22 }; 23 24 nativeBuildInputs = [ 25 setuptools-rust 26 ] ++ (with rustPlatform; [ 27 cargoSetupHook 28 maturinBuildHook 29 ]); 30 31 cargoDeps = rustPlatform.fetchCargoTarball { 32 inherit src; 33 name = "${pname}-${version}"; 34 hash = "sha256-iVrF+9D4HHRx1E10GbGftcmil3Epw6iuRdf2m2o+/u8="; 35 }; 36 37 # Module has no tests, only a test client 38 doCheck = false; 39 40 pythonImportsCheck = [ 41 "mitmproxy_wireguard" 42 ]; 43 44 meta = with lib; { 45 description = "WireGuard frontend for mitmproxy"; 46 homepage = "https://github.com/decathorpe/mitmproxy_wireguard"; 47 changelog = "https://github.com/decathorpe/mitmproxy_wireguard/releases/tag/${version}"; 48 license = licenses.mit; 49 maintainers = with maintainers; [ fab ]; 50 }; 51}