2017-07-18 22:33:10 +01:00
|
|
|
{ stdenv, fetchpatch, fetchFromGitHub, python3Packages }:
|
2017-01-04 08:18:04 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonPackage rec {
|
|
|
|
baseName = "mitmproxy";
|
|
|
|
name = "${baseName}-${version}";
|
2017-06-20 00:57:04 +01:00
|
|
|
version = "2.0.2";
|
2017-01-04 08:18:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = baseName;
|
|
|
|
repo = baseName;
|
|
|
|
rev = "v${version}";
|
2017-06-20 00:57:04 +01:00
|
|
|
sha256 = "1x1a28al5clpfd69rjcpw26gjjnpsm1vfl4scrwpdd1jhkw044h9";
|
2017-01-04 08:18:04 +00:00
|
|
|
};
|
|
|
|
|
2017-07-10 18:43:55 +01:00
|
|
|
patches = [
|
2017-08-28 07:27:59 +01:00
|
|
|
# fix tests
|
2017-07-18 22:33:10 +01:00
|
|
|
(fetchpatch {
|
2017-08-28 07:27:59 +01:00
|
|
|
url = "https://github.com/mitmproxy/mitmproxy/commit/b3525570929ba47c10d9d08696876c39487f7000.patch";
|
|
|
|
sha256 = "111fld5gqdii7rs1jhqaqrxgbyhfn6qd0y7l15k4npamsnvdnv20";
|
2017-07-10 18:43:55 +01:00
|
|
|
})
|
2017-08-28 07:27:59 +01:00
|
|
|
# bump pyOpenSSL
|
|
|
|
(fetchpatch {
|
|
|
|
url = https://github.com/mitmproxy/mitmproxy/commit/6af72160bf98b58682b8f9fc5aabf51928d2b1d3.patch;
|
|
|
|
sha256 = "1q4ml81pq9c8j9iscq8janbxf4s37w3bqskbs6r30yqzy63v54f2";
|
|
|
|
})
|
|
|
|
# https://github.com/mitmproxy/mitmproxy/commit/3d7cde058b7e6242d93b9bc9d3e17520ffb578a5
|
|
|
|
./tornado-4.6.patch
|
2017-07-10 18:43:55 +01:00
|
|
|
];
|
|
|
|
|
2017-08-28 07:27:59 +01:00
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
LC_CTYPE=en_US.UTF-8 python setup.py pytest
|
|
|
|
'';
|
|
|
|
|
2017-01-04 08:18:04 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2017-03-04 00:07:40 +00:00
|
|
|
blinker click certifi construct cryptography
|
|
|
|
cssutils editorconfig h2 html2text hyperframe
|
|
|
|
jsbeautifier kaitaistruct passlib pyasn1 pyopenssl
|
2017-05-07 11:55:45 +01:00
|
|
|
pyparsing pyperclip requests ruamel_yaml tornado
|
2017-03-04 00:07:40 +00:00
|
|
|
urwid watchdog brotlipy sortedcontainers
|
2017-01-04 08:18:04 +00:00
|
|
|
];
|
|
|
|
|
2017-08-28 07:27:59 +01:00
|
|
|
buildInputs = with python3Packages; [
|
|
|
|
beautifulsoup4 flask pytz pytest pytestrunner protobuf3_2
|
|
|
|
];
|
2017-01-04 08:18:04 +00:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Man-in-the-middle proxy";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = http://mitmproxy.org/;
|
2017-01-04 08:18:04 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ fpletz ];
|
|
|
|
};
|
|
|
|
}
|