mitmproxy: 2017-10-31 -> 3.0.2

rnhmjoj 85dda553 48283de6

+22 -35
+22 -35
pkgs/tools/networking/mitmproxy/default.nix
··· 1 - { stdenv, fetchpatch, fetchFromGitHub, fetchurl, python3, glibcLocales }: 1 + { stdenv, fetchFromGitHub, python3Packages, glibcLocales }: 2 2 3 - let 4 - # When overrides are not needed, then only remove the contents of this set. 5 - packageOverrides = self: super: { 6 - ldap3 = super.ldap3.overridePythonAttrs (oldAttrs: rec { 7 - version = "2.3"; 8 - src = oldAttrs.src.override { 9 - inherit version; 10 - sha256 = "c056b3756076e15aa71c963c7c5a44d5d9bbd430263ee49598d4454223a766ac"; 11 - }; 12 - }); 13 - pyasn1 = super.pyasn1.overridePythonAttrs (oldAttrs: rec { 14 - version = "0.3.7"; 15 - src = oldAttrs.src.override { 16 - inherit version; 17 - sha256 = "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965"; 18 - }; 19 - }); 20 - }; 21 - 22 - pythonPackages = (python3.override {inherit packageOverrides; }).pkgs; 23 - in with pythonPackages; 3 + with python3Packages; 24 4 25 5 buildPythonPackage rec { 26 - baseName = "mitmproxy"; 27 - name = "${baseName}-unstable-2017-10-31"; 6 + pname = "mitmproxy"; 7 + version = "3.0.2"; 28 8 29 9 src = fetchFromGitHub { 30 - owner = baseName; 31 - repo = baseName; 32 - rev = "80a8eaa708ea31dd9c5e7e1ab6b02c69079039c0"; 10 + owner = pname; 11 + repo = pname; 12 + rev = "v${version}"; 33 13 sha256 = "0rvwm11yryzlp3c1i42rk2iv1m38yn6r83k41jb51hwg6wzbwzvw"; 34 14 }; 35 15 16 + postPatch = '' 17 + # remove dependency constraints 18 + sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?//' -i setup.py 19 + ''; 20 + 36 21 checkPhase = '' 37 22 export HOME=$(mktemp -d) 23 + export LC_CTYPE=en_US.UTF-8 38 24 # test_echo resolves hostnames 39 - LC_CTYPE=en_US.UTF-8 pytest -k 'not test_echo and not test_find_unclaimed_URLs ' 25 + pytest -k 'not test_echo and not test_find_unclaimed_URLs ' 40 26 ''; 41 27 42 28 propagatedBuildInputs = [ 43 29 blinker click certifi cryptography 44 - h2 hyperframe 45 - kaitaistruct passlib pyasn1 pyopenssl 46 - pyparsing pyperclip requests ruamel_yaml tornado 47 - urwid brotlipy sortedcontainers ldap3 30 + h2 hyperframe kaitaistruct passlib 31 + pyasn1 pyopenssl pyparsing pyperclip 32 + requests ruamel_yaml tornado urwid 33 + brotlipy sortedcontainers ldap3 48 34 ]; 49 35 50 36 buildInputs = [ 51 - beautifulsoup4 flask pytest pytestrunner glibcLocales 37 + beautifulsoup4 flask pytest 38 + pytestrunner glibcLocales 52 39 ]; 53 40 54 41 meta = with stdenv.lib; { 55 42 description = "Man-in-the-middle proxy"; 56 - homepage = https://mitmproxy.org/; 57 - license = licenses.mit; 43 + homepage = https://mitmproxy.org/; 44 + license = licenses.mit; 58 45 maintainers = with maintainers; [ fpletz kamilchm ]; 59 46 }; 60 47 }