2022-11-02 22:02:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, rustPlatform
|
|
|
|
, setuptools-rust
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mitmproxy-wireguard";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "0.1.19";
|
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}";
|
2022-11-27 09:42:12 +00:00
|
|
|
hash = "sha256-6LgA8IaUCfScEr+tEG5lkt0MnWoA9Iab4kAseUvZFFo=";
|
2022-11-02 22:02:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-rust
|
|
|
|
] ++ (with rustPlatform; [
|
|
|
|
cargoSetupHook
|
|
|
|
maturinBuildHook
|
|
|
|
]);
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
inherit src;
|
|
|
|
name = "${pname}-${version}";
|
2022-11-27 09:42:12 +00:00
|
|
|
hash = "sha256-wuroElBc0LQL0gf+P6Nffv3YsyDJliXksZCgcBfK0iw=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|