3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/mitmproxy/default.nix

48 lines
1.1 KiB
Nix
Raw Normal View History

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