2017-10-04 13:03:13 +01:00
|
|
|
{ stdenv, fetchpatch, fetchFromGitHub, fetchurl, python3, glibcLocales }:
|
2017-01-04 08:18:04 +00:00
|
|
|
|
2017-12-31 12:50:17 +00:00
|
|
|
let
|
|
|
|
# When overrides are not needed, then only remove the contents of this set.
|
|
|
|
packageOverrides = self: super: {
|
|
|
|
ldap3 = super.ldap3.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "2.3";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "c056b3756076e15aa71c963c7c5a44d5d9bbd430263ee49598d4454223a766ac";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
pyasn1 = super.pyasn1.overridePythonAttrs (oldAttrs: rec {
|
|
|
|
version = "0.3.7";
|
|
|
|
src = oldAttrs.src.override {
|
|
|
|
inherit version;
|
|
|
|
sha256 = "187f2a66d617683f8e82d5c00033b7c8a0287e1da88a9d577aebec321cad4965";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
pythonPackages = (python3.override {inherit packageOverrides; }).pkgs;
|
|
|
|
in with pythonPackages;
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2017-01-04 08:18:04 +00:00
|
|
|
baseName = "mitmproxy";
|
2017-11-02 23:38:23 +00:00
|
|
|
name = "${baseName}-unstable-2017-10-31";
|
2017-01-04 08:18:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = baseName;
|
|
|
|
repo = baseName;
|
2017-11-02 23:38:23 +00:00
|
|
|
rev = "80a8eaa708ea31dd9c5e7e1ab6b02c69079039c0";
|
|
|
|
sha256 = "0rvwm11yryzlp3c1i42rk2iv1m38yn6r83k41jb51hwg6wzbwzvw";
|
2017-01-04 08:18:04 +00:00
|
|
|
};
|
|
|
|
|
2017-08-28 07:27:59 +01:00
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2017-09-04 22:46:19 +01:00
|
|
|
# test_echo resolves hostnames
|
2017-11-02 23:38:23 +00:00
|
|
|
LC_CTYPE=en_US.UTF-8 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
|
|
|
|
h2 hyperframe
|
|
|
|
kaitaistruct passlib pyasn1 pyopenssl
|
2017-05-07 11:55:45 +01:00
|
|
|
pyparsing pyperclip requests ruamel_yaml tornado
|
2017-11-02 23:38:23 +00:00
|
|
|
urwid brotlipy sortedcontainers ldap3
|
2017-01-04 08:18:04 +00:00
|
|
|
];
|
|
|
|
|
2017-12-31 12:50:17 +00:00
|
|
|
buildInputs = [
|
2017-11-02 23:38:23 +00:00
|
|
|
beautifulsoup4 flask pytest pytestrunner glibcLocales
|
2017-08-28 07:27:59 +01:00
|
|
|
];
|
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;
|
2017-10-04 13:03:13 +01:00
|
|
|
maintainers = with maintainers; [ fpletz kamilchm ];
|
2017-01-04 08:18:04 +00:00
|
|
|
};
|
|
|
|
}
|