2018-02-24 17:38:59 -08:00
|
|
|
{ stdenv, fetchFromGitHub, python3Packages, glibcLocales }:
|
2017-12-31 04:50:17 -08:00
|
|
|
|
2018-02-24 17:38:59 -08:00
|
|
|
with python3Packages;
|
2017-12-31 04:50:17 -08:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2018-02-24 17:38:59 -08:00
|
|
|
pname = "mitmproxy";
|
2018-04-06 05:45:56 -07:00
|
|
|
version = "3.0.4";
|
2017-01-04 00:18:04 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-02-24 17:38:59 -08:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2018-04-06 05:45:56 -07:00
|
|
|
sha256 = "10l761ds46r1p2kjxlgby9vdxbjjlgq72s6adjypghi41s3qf034";
|
2017-01-04 00:18:04 -08:00
|
|
|
};
|
|
|
|
|
2018-02-24 17:38:59 -08:00
|
|
|
postPatch = ''
|
|
|
|
# remove dependency constraints
|
|
|
|
sed 's/>=\([0-9]\.\?\)\+\( \?, \?<\([0-9]\.\?\)\+\)\?//' -i setup.py
|
|
|
|
'';
|
|
|
|
|
2018-06-10 17:31:06 -07:00
|
|
|
doCheck = (!stdenv.isDarwin);
|
|
|
|
|
2017-08-27 23:27:59 -07:00
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2018-02-24 17:38:59 -08:00
|
|
|
export LC_CTYPE=en_US.UTF-8
|
2017-09-04 14:46:19 -07:00
|
|
|
# test_echo resolves hostnames
|
2018-02-24 17:38:59 -08:00
|
|
|
pytest -k 'not test_echo and not test_find_unclaimed_URLs '
|
2017-08-27 23:27:59 -07:00
|
|
|
'';
|
|
|
|
|
2017-12-31 04:50:17 -08:00
|
|
|
propagatedBuildInputs = [
|
2017-11-02 16:38:23 -07:00
|
|
|
blinker click certifi cryptography
|
2018-02-24 17:38:59 -08:00
|
|
|
h2 hyperframe kaitaistruct passlib
|
|
|
|
pyasn1 pyopenssl pyparsing pyperclip
|
2018-04-06 05:45:56 -07:00
|
|
|
ruamel_yaml tornado urwid brotlipy
|
|
|
|
sortedcontainers ldap3 wsproto
|
2017-01-04 00:18:04 -08:00
|
|
|
];
|
|
|
|
|
2018-04-06 05:45:56 -07:00
|
|
|
checkInputs = [
|
2018-02-24 17:38:59 -08:00
|
|
|
beautifulsoup4 flask pytest
|
2018-04-06 05:45:56 -07:00
|
|
|
requests glibcLocales
|
2017-08-27 23:27:59 -07:00
|
|
|
];
|
2017-01-04 00:18:04 -08:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Man-in-the-middle proxy";
|
2018-02-24 17:38:59 -08:00
|
|
|
homepage = https://mitmproxy.org/;
|
|
|
|
license = licenses.mit;
|
2017-10-04 05:03:13 -07:00
|
|
|
maintainers = with maintainers; [ fpletz kamilchm ];
|
2017-01-04 00:18:04 -08:00
|
|
|
};
|
|
|
|
}
|