diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix new file mode 100644 index 00000000000..8e82023d50a --- /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 7c247b5dddf..9ca802571cc 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 949cb86d2c2..e99e70ec379 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2865,11 +2865,11 @@ in { blinker = buildPythonPackage rec { name = "blinker-${version}"; - version = "1.3"; + version = "1.4"; src = pkgs.fetchurl { url = "mirror://pypi/b/blinker/${name}.tar.gz"; - sha256 = "6811010809262261e41ab7b92f3f6d23f35cf816fbec2bc05077992eebec6e2f"; + sha256 = "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"; }; meta = { @@ -4125,15 +4125,22 @@ in { construct = buildPythonPackage rec { - name = "construct-2.5.2"; + name = "construct-${version}"; + version = "2.8.10"; - src = pkgs.fetchurl { - url = "mirror://pypi/c/construct/${name}.tar.gz"; - sha256 = "084h02p0m8lhmlywlwjdg0kd0hd6sz481c96qwcm5wddxrqn4nv6"; + src = pkgs.fetchFromGitHub { + owner = "construct"; + repo = "construct"; + rev = "v${version}"; + sha256 = "1xfmmc5pihn3ql9f7blrciy06y2bwczqvkbcpvh96dmgqwc3wys3"; }; propagatedBuildInputs = with self; [ six ]; + # Tests fail with the following error on Python 3.5+ + # TypeError: not all arguments converted during string formatting + doCheck = pythonOlder "3.5"; + meta = { description = "Powerful declarative parser (and builder) for binary data"; homepage = http://construct.readthedocs.org/; @@ -5406,11 +5413,11 @@ in { }; cssutils = buildPythonPackage (rec { - name = "cssutils-0.9.9"; + name = "cssutils-1.0.1"; src = pkgs.fetchurl { - url = mirror://pypi/c/cssutils/cssutils-0.9.9.zip; - sha256 = "139yfm9yz9k33kgqw4khsljs10rkhhxyywbq9i82bh2r31cil1pp"; + url = mirror://pypi/c/cssutils/cssutils-1.0.1.tar.gz; + sha256 = "0qwha9x1wml2qmipbcz03gndnlwhzrjdvw9i09si247a90l8p8fq"; }; buildInputs = with self; [ self.mock ]; @@ -14633,31 +14640,91 @@ in { }; }; + brotlipy = buildPythonPackage rec { + name = "brotlipy-${version}"; + version = "0.6.0"; - mitmproxy = buildPythonPackage rec { - baseName = "mitmproxy"; - name = "${baseName}-${version}"; - version = "0.17.1"; - - src = pkgs.fetchFromGitHub { - owner = "mitmproxy"; - repo = "mitmproxy"; - rev = "v${version}"; - sha256 = "0a50mkvm3zf9cbs0pf6bwy00bhmy4d1l9as8c9m0bgrk6hq7h53p"; + src = pkgs.fetchurl { + url = "mirror://pypi/b/brotlipy/${name}.tar.gz"; + sha256 = "10s2y19zywfkf3sksrw81czhva759aki0clld2pnnlgf64sz7016"; }; - propagatedBuildInputs = with self; [ - pyopenssl pyasn1 urwid pillow lxml flask protobuf click - ConfigArgParse pyperclip blinker construct pyparsing html2text tornado - ]; - - doCheck = false; + propagatedBuildInputs = with self; [ cffi enum34 construct ]; meta = { - description = ''Man-in-the-middle proxy''; - homepage = "http://mitmproxy.org/"; + description = "Python bindings for the reference Brotli encoder/decoder"; + homepage = "https://github.com/python-hyper/brotlipy/"; license = licenses.mit; - broken = true; + }; + }; + + sortedcontainers = buildPythonPackage rec { + name = "sortedcontainers-${version}"; + version = "1.5.7"; + + src = pkgs.fetchurl { + url = "mirror://pypi/s/sortedcontainers/${name}.tar.gz"; + sha256 = "1sjh8lccbmvwna91mlhl5m3z4320p07h063b8x8br4p4cll49w0g"; + }; + + # tries to run tests for all python versions and uses virtualenv weirdly + doCheck = false; + #buildInputs = with self; [ tox nose ]; + + meta = { + description = "Python Sorted Container Types: SortedList, SortedDict, and SortedSet"; + homepage = "http://www.grantjenks.com/docs/sortedcontainers/"; + license = licenses.asl20; + }; + }; + + hyperframe = buildPythonPackage rec { + name = "hyperframe-${version}"; + version = "4.0.1"; + + src = pkgs.fetchurl { + url = "mirror://pypi/h/hyperframe/${name}.tar.gz"; + sha256 = "0hsfq0jigwa0i58z7vbnp62l7za49gmlg75vnygq2ijhkidkcmwa"; + }; + + meta = { + description = "HTTP/2 framing layer for Python"; + homepage = "http://hyper.rtfd.org/"; + license = licenses.mit; + }; + }; + + h2 = buildPythonPackage rec { + name = "h2-${version}"; + version = "2.5.1"; + + src = pkgs.fetchurl { + url = "mirror://pypi/h/h2/${name}.tar.gz"; + sha256 = "0xhzm5vcfhdq3mihynwh4ljwi0r06lvzk3ypr0gmmbcp1x43ffb7"; + }; + + propagatedBuildInputs = with self; [ enum34 hpack hyperframe ]; + + meta = { + description = "HTTP/2 State-Machine based protocol implementation"; + homepage = "http://hyper.rtfd.org/"; + license = licenses.mit; + }; + }; + + editorconfig = buildPythonPackage rec { + name = "EditorConfig-${version}"; + version = "0.12.1"; + + src = pkgs.fetchurl { + url = "mirror://pypi/e/editorconfig/${name}.tar.gz"; + sha256 = "1qxqy9wfrpb2ldrk5nzidkpymc55lpf9lg3m8c8a5531jmbwhlwb"; + }; + + meta = { + description = "EditorConfig File Locator and Interpreter for Python"; + homepage = "http://editorconfig.org/"; + license = licenses.psfl; }; }; @@ -15540,20 +15607,13 @@ in { hpack = buildPythonPackage rec { name = "hpack-${version}"; - version = "2.0.1"; + version = "2.3.0"; src = pkgs.fetchurl { url = "mirror://pypi/h/hpack/hpack-${version}.tar.gz"; - sha256 = "1k4wa8c52bd6x109bn6hc945595w6aqgzj6ipy6c2q7vxkzalzhd"; + sha256 = "1ad0fx4d7a52zf441qzhjc7vwy9v3qdrk1zyf06ikz8y2nl9mgai"; }; - propagatedBuildInputs = with self; [ - - ]; - buildInputs = with self; [ - - ]; - meta = with stdenv.lib; { description = "========================================"; homepage = "http://hyper.rtfd.org"; @@ -21501,12 +21561,12 @@ in { }; pyperclip = buildPythonPackage rec { - version = "1.5.11"; + version = "1.5.27"; name = "pyperclip-${version}"; src = pkgs.fetchurl { url = "mirror://pypi/p/pyperclip/${name}.zip"; - sha256 = "07q8krmi7phizzp192x3j7xbk1gzhc1kc3jp4mxrm32dn84sp1vh"; + sha256 = "1i9zxm7qc49n9yxfb41c0jbmmp2hpzx98kaizjl7qmgiv3snvjx3"; }; doCheck = false; @@ -22914,16 +22974,38 @@ in { }; }; + typing = buildPythonPackage rec { + name = "typing-${version}"; + version = "3.5.3.0"; + + src = pkgs.fetchurl { + url = "mirror://pypi/t/typing/${name}.tar.gz"; + sha256 = "08gz3grrh3vph5ib1w5x1ssnpzvj077x030lx63fxs4kwg3slbfa"; + }; + + meta = { + description = "Backport of typing module to Python versions older than 3.5"; + homepage = "https://docs.python.org/3.5/library/typing.html"; + license = licenses.psfl; + }; + }; + ruamel_yaml = buildPythonPackage rec { name = "ruamel.yaml-${version}"; - version = "0.10.13"; + version = "0.13.7"; + + # needs ruamel_ordereddict for python2 support + disabled = !isPy3k; src = pkgs.fetchurl { url = "mirror://pypi/r/ruamel.yaml/${name}.tar.gz"; - sha256 = "0r9mn5lm9dcxpy0wpn18cp7i5hkvjvknv3dxg8d9ca6km39m4asn"; + sha256 = "1vca2552k0kmhr9msg1bbfdvp3p9im17x1a6npaw221vlgg15z7h"; }; - propagatedBuildInputs = with self; [ ruamel_base ruamel_ordereddict ]; + # Tests cannot load the module to test + doCheck = false; + + propagatedBuildInputs = with self; [ ruamel_base typing ]; meta = { description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"; @@ -26188,14 +26270,14 @@ in { urwid = buildPythonPackage (rec { - name = "urwid-1.3.0"; + name = "urwid-1.3.1"; # multiple: NameError: name 'evl' is not defined doCheck = false; src = pkgs.fetchurl { url = "mirror://pypi/u/urwid/${name}.tar.gz"; - sha256 = "29f04fad3bf0a79c5491f7ebec2d50fa086e9d16359896c9204c6a92bc07aba2"; + sha256 = "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"; }; meta = {