mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
mitmproxy: 2.0.2 -> 2017-10-31
This commit is contained in:
parent
f255de884b
commit
0433604f51
@ -1,82 +1,32 @@
|
||||
{ stdenv, fetchpatch, fetchFromGitHub, fetchurl, python3, glibcLocales }:
|
||||
|
||||
let
|
||||
p = python3.override {
|
||||
packageOverrides = self: super: {
|
||||
cryptography = super.cryptography.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "1.8.2";
|
||||
name = "${oldAttrs.pname}-${version}";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "8e88ebac371a388024dab3ccf393bf3c1790d21bc3c299d5a6f9f83fb823beda";
|
||||
};
|
||||
});
|
||||
cryptography_vectors = super.cryptography_vectors.overridePythonAttrs (oldAttrs: rec {
|
||||
version = self.cryptography.version;
|
||||
name = "${oldAttrs.pname}-${version}";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "00daa04c9870345f56605d91d7d4897bc1b16f6fff7c74cb602b08ef16c0fb43";
|
||||
};
|
||||
});
|
||||
pyopenssl = super.pyopenssl.overridePythonAttrs (oldAttrs: rec {
|
||||
version = "17.0.0";
|
||||
name = "${oldAttrs.pname}-${version}";
|
||||
src = oldAttrs.src.override {
|
||||
inherit version;
|
||||
sha256 = "1pdg1gpmkzj8yasg6cmkhcivxcdp4c12nif88y4qvsxq5ffzxas8";
|
||||
};
|
||||
patches = fetchpatch {
|
||||
url = "https://github.com/pyca/pyopenssl/commit/"
|
||||
+ "a40898b5f1d472f9449a344f703fa7f90cddc21d.patch";
|
||||
sha256 = "0bdfrhfvdfxhfknn46s4db23i3hww6ami2r1l5rfrri0pn8b8mh7";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
in p.pkgs.buildPythonPackage rec {
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
baseName = "mitmproxy";
|
||||
name = "${baseName}-${version}";
|
||||
version = "2.0.2";
|
||||
name = "${baseName}-unstable-2017-10-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = baseName;
|
||||
repo = baseName;
|
||||
rev = "v${version}";
|
||||
sha256 = "1x1a28al5clpfd69rjcpw26gjjnpsm1vfl4scrwpdd1jhkw044h9";
|
||||
rev = "80a8eaa708ea31dd9c5e7e1ab6b02c69079039c0";
|
||||
sha256 = "0rvwm11yryzlp3c1i42rk2iv1m38yn6r83k41jb51hwg6wzbwzvw";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix tests
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mitmproxy/mitmproxy/commit/b3525570929ba47c10d9d08696876c39487f7000.patch";
|
||||
sha256 = "111fld5gqdii7rs1jhqaqrxgbyhfn6qd0y7l15k4npamsnvdnv20";
|
||||
})
|
||||
# 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
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
export HOME=$(mktemp -d)
|
||||
# test_echo resolves hostnames
|
||||
LC_CTYPE=en_US.UTF-8 pytest -k 'not test_echo'
|
||||
LC_CTYPE=en_US.UTF-8 pytest -k 'not test_echo and not test_find_unclaimed_URLs '
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with p.pkgs; [
|
||||
blinker click certifi construct cryptography
|
||||
cssutils editorconfig h2 html2text hyperframe
|
||||
jsbeautifier kaitaistruct passlib pyasn1 pyopenssl
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
blinker click certifi cryptography
|
||||
h2 hyperframe
|
||||
kaitaistruct passlib pyasn1 pyopenssl
|
||||
pyparsing pyperclip requests ruamel_yaml tornado
|
||||
urwid watchdog brotlipy sortedcontainers
|
||||
urwid brotlipy sortedcontainers ldap3
|
||||
];
|
||||
|
||||
buildInputs = with p.pkgs; [
|
||||
beautifulsoup4 flask pytz pytest pytestrunner protobuf glibcLocales
|
||||
buildInputs = with python3.pkgs; [
|
||||
beautifulsoup4 flask pytest pytestrunner glibcLocales
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user