diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix new file mode 100644 index 000000000000..8e82023d50a2 --- /dev/null +++ b/pkgs/tools/networking/mitmproxy/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonPackage rec { + baseName = "mitmproxy"; + name = "${baseName}-${version}"; + version = "1.0.2"; + + src = fetchFromGitHub { + owner = baseName; + repo = baseName; + rev = "v${version}"; + sha256 = "19nqg7s1034fal8sb2rjssgcpvxh50yidyjhnbfmmi8v3fbvpbwl"; + }; + + propagatedBuildInputs = with python3Packages; [ + pyopenssl pyasn1 urwid pillow flask click pyperclip blinker + construct pyparsing html2text tornado brotlipy requests2 + sortedcontainers passlib cssutils h2 ruamel_yaml jsbeautifier + watchdog editorconfig + ]; + + # Tests fail due to an error with a decorator + doCheck = false; + + meta = with stdenv.lib; { + description = "Man-in-the-middle proxy"; + homepage = "http://mitmproxy.org/"; + license = licenses.mit; + maintainers = with maintainers; [ fpletz ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7c247b5dddf6..9ca802571cc0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2818,6 +2818,8 @@ in miredo = callPackage ../tools/networking/miredo { }; + mitmproxy = callPackage ../tools/networking/mitmproxy { }; + mjpegtoolsFull = callPackage ../tools/video/mjpegtools { }; mjpegtools = self.mjpegtoolsFull.override { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3a4218c1f211..e99e70ec3791 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -14728,33 +14728,6 @@ in { }; }; - mitmproxy = buildPythonPackage rec { - baseName = "mitmproxy"; - name = "${baseName}-${version}"; - version = "0.17.1"; - - src = pkgs.fetchFromGitHub { - owner = "mitmproxy"; - repo = "mitmproxy"; - rev = "v${version}"; - sha256 = "0a50mkvm3zf9cbs0pf6bwy00bhmy4d1l9as8c9m0bgrk6hq7h53p"; - }; - - propagatedBuildInputs = with self; [ - pyopenssl pyasn1 urwid pillow lxml flask protobuf click - ConfigArgParse pyperclip blinker construct pyparsing html2text tornado - ]; - - doCheck = false; - - meta = { - description = ''Man-in-the-middle proxy''; - homepage = "http://mitmproxy.org/"; - license = licenses.mit; - broken = true; - }; - }; - mock = buildPythonPackage (rec { name = "mock-2.0.0";