From 14d3a7d744dc6d8b93282f87dfe19585cff923bd Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 22:41:03 +0000 Subject: [PATCH 1/8] python.pkgs.urwid: fix tests --- pkgs/development/python-modules/urwid/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/urwid/default.nix b/pkgs/development/python-modules/urwid/default.nix index 129f4821e875..8d5b7ab76e5d 100644 --- a/pkgs/development/python-modules/urwid/default.nix +++ b/pkgs/development/python-modules/urwid/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi }: +{ stdenv, buildPythonPackage, fetchPypi, fetchpatch }: buildPythonPackage (rec { pname = "urwid"; @@ -10,6 +10,19 @@ buildPythonPackage (rec { sha256 = "18cnd1wdjcas08x5qwa5ayw6jsfcn33w4d9f7q3s29fy6qzc1kng"; }; + patches = [ + # fix tests + (fetchpatch { + url = "https://github.com/mwhudson/urwid/commit/4b0ed8b6030450e6d99909a7c683e9642e546387.patch"; + sha256 = "0azpn0ylbg8mfpr0y27n4lnq0ph75a4d4m9wdv3napnhf1vh9ahx"; + }) + # fix tests + (fetchpatch { + url = "https://github.com/floppym/urwid/commit/f68f2cf089cfd5ec45863baf59a91d5aeb0cf5c3.patch"; + sha256 = "1b3vz7mrwz2bqvdwvbyv2j835f9lzapgw0j2km4sam76bxmgfpgq"; + }) + ]; + meta = with stdenv.lib; { description = "A full-featured console (xterm et al.) user interface library"; homepage = http://excess.org/urwid; From 9d8cc4fab073478b9453b616b0bc2375b16134a6 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:32:49 +0000 Subject: [PATCH 2/8] python.pkgs.hyperframe: 4.0.1 -> 5.1.0 --- .../python-modules/hyperframe/default.nix | 17 +++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +--------------- 2 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/hyperframe/default.nix diff --git a/pkgs/development/python-modules/hyperframe/default.nix b/pkgs/development/python-modules/hyperframe/default.nix new file mode 100644 index 000000000000..91e00a7a1461 --- /dev/null +++ b/pkgs/development/python-modules/hyperframe/default.nix @@ -0,0 +1,17 @@ +{ stdenv, buildPythonPackage, fetchPypi }: +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "hyperframe"; + version = "5.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "017vjbb1xjak1pxcvihhilzjnmpfvhapk7k88wp6lvdkkm9l8nd2"; + }; + + meta = with stdenv.lib; { + description = "HTTP/2 framing layer for Python"; + homepage = "http://hyper.rtfd.org/"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b9c5fa93dfa5..fa5ee02f51cd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11604,21 +11604,7 @@ in { }; }; - hyperframe = buildPythonPackage rec { - name = "hyperframe-${version}"; - version = "4.0.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/h/hyperframe/${name}.tar.gz"; - sha256 = "0hsfq0jigwa0i58z7vbnp62l7za49gmlg75vnygq2ijhkidkcmwa"; - }; - - meta = { - description = "HTTP/2 framing layer for Python"; - homepage = "http://hyper.rtfd.org/"; - license = licenses.mit; - }; - }; + hyperframe = callPackage ../development/python-modules/hyperframe { }; h2 = buildPythonPackage rec { name = "h2-${version}"; From fd261eefbd99e7a4d3e5adc9cfa99a32d5b7ca7d Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:33:38 +0000 Subject: [PATCH 3/8] python.pkgs.h2: 2.5.1 -> 3.0.1 --- .../development/python-modules/h2/default.nix | 21 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +--------------- 2 files changed, 22 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/h2/default.nix diff --git a/pkgs/development/python-modules/h2/default.nix b/pkgs/development/python-modules/h2/default.nix new file mode 100644 index 000000000000..08cd1943eff6 --- /dev/null +++ b/pkgs/development/python-modules/h2/default.nix @@ -0,0 +1,21 @@ +{ stdenv, buildPythonPackage, fetchPypi +, enum34, hpack, hyperframe }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "h2"; + version = "3.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "0r3f43r0v7sqgdjjg5ngw0dndk2v6cyd0jncpwya54m37y42z5mj"; + }; + + propagatedBuildInputs = [ enum34 hpack hyperframe ]; + + meta = with stdenv.lib; { + description = "HTTP/2 State-Machine based protocol implementation"; + homepage = "http://hyper.rtfd.org/"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fa5ee02f51cd..1e6101f0bbb8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11606,23 +11606,7 @@ in { hyperframe = callPackage ../development/python-modules/hyperframe { }; - h2 = buildPythonPackage rec { - name = "h2-${version}"; - version = "2.5.1"; - - src = pkgs.fetchurl { - url = "mirror://pypi/h/h2/${name}.tar.gz"; - sha256 = "0xhzm5vcfhdq3mihynwh4ljwi0r06lvzk3ypr0gmmbcp1x43ffb7"; - }; - - propagatedBuildInputs = with self; [ enum34 hpack hyperframe ]; - - meta = { - description = "HTTP/2 State-Machine based protocol implementation"; - homepage = "http://hyper.rtfd.org/"; - license = licenses.mit; - }; - }; + h2 = callPackage ../development/python-modules/h2 { }; editorconfig = buildPythonPackage rec { name = "EditorConfig-${version}"; From 206a3c7653491165f8947aab18361787a2521119 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:34:11 +0000 Subject: [PATCH 4/8] python.pkgs.kaitaistruct: 0.6 -> 0.7 --- .../python-modules/kaitaistruct/default.nix | 18 ++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +--------------- 2 files changed, 19 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/kaitaistruct/default.nix diff --git a/pkgs/development/python-modules/kaitaistruct/default.nix b/pkgs/development/python-modules/kaitaistruct/default.nix new file mode 100644 index 000000000000..c99619566175 --- /dev/null +++ b/pkgs/development/python-modules/kaitaistruct/default.nix @@ -0,0 +1,18 @@ +{ stdenv, kaitaistruct, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "kaitaistruct"; + version = "0.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "19j3snmr0qbd48f7yd3cc21ffv13dahf8ys591dnalbhvnkar71i"; + }; + + meta = with stdenv.lib; { + description = "Kaitai Struct: runtime library for Python"; + homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1e6101f0bbb8..b2962dc84597 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -13812,21 +13812,7 @@ in { pecan = callPackage ../development/python-modules/pecan { }; - kaitaistruct = buildPythonPackage rec { - name = "kaitaistruct-${version}"; - version = "0.6"; - - src = pkgs.fetchurl { - url = "mirror://pypi/k/kaitaistruct/${name}.tar.gz"; - sha256 = "0rwcrlz7f2bwmypqa38pag492bp71wp1bhz51hsaynjjyr9knr12"; - }; - - meta = with stdenv.lib; { - description = "Kaitai Struct: runtime library for Python"; - homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime"; - license = licenses.mit; - }; - }; + kaitaistruct = callPackage ../development/python-modules/kaitaistruct { }; Kajiki = buildPythonPackage rec { name = "Kajiki-${version}"; From a478343856d0a3e47ecd198c3bde1735c934c658 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:35:11 +0000 Subject: [PATCH 5/8] python.pkgs.pyasn1: 0.1.9 -> 0.3.4 --- .../python-modules/pyasn1/default.nix | 19 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 16 +--------------- 2 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 pkgs/development/python-modules/pyasn1/default.nix diff --git a/pkgs/development/python-modules/pyasn1/default.nix b/pkgs/development/python-modules/pyasn1/default.nix new file mode 100644 index 000000000000..d0122a5b7e40 --- /dev/null +++ b/pkgs/development/python-modules/pyasn1/default.nix @@ -0,0 +1,19 @@ +{ stdenv, buildPythonPackage, fetchPypi, }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pyasn1"; + version = "0.3.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "06hhy38jhwh95gpn8f03cr439273fsfsh4vhd5024r86nh5gyiir"; + }; + + meta = with stdenv.lib; { + description = "ASN.1 tools for Python"; + homepage = http://pyasn1.sourceforge.net/; + license = "mBSD"; + platforms = platforms.unix; # arbitrary choice + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b2962dc84597..c549a3bad4a6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15524,21 +15524,7 @@ in { }; - pyasn1 = buildPythonPackage rec { - name = "pyasn1-0.1.9"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyasn1/${name}.tar.gz"; - sha256 = "0zraxni14bqi20kr4bi6nwsh32aibz0fq0xaczfisw0zdpcsqg45"; - }; - - meta = { - description = "ASN.1 tools for Python"; - homepage = http://pyasn1.sourceforge.net/; - license = "mBSD"; - platforms = platforms.unix; # arbitrary choice - }; - }; + pyasn1 = callPackage ../development/python-modules/pyasn1 { }; pyasn1-modules = buildPythonPackage rec { name = "pyasn1-modules-${version}"; From 3cdbc9705dd186581a812e362879b798064dfb55 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:35:52 +0000 Subject: [PATCH 6/8] python.pkgs.pyasn1-modules: 0.0.8 -> 0.1.5 --- .../python-modules/pyasn1-modules/default.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +---------------- 2 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/pyasn1-modules/default.nix diff --git a/pkgs/development/python-modules/pyasn1-modules/default.nix b/pkgs/development/python-modules/pyasn1-modules/default.nix new file mode 100644 index 000000000000..a7ee15d6a181 --- /dev/null +++ b/pkgs/development/python-modules/pyasn1-modules/default.nix @@ -0,0 +1,22 @@ +{ stdenv, buildPythonPackage, fetchPypi, pyasn1, isPyPy }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pyasn1-modules"; + version = "0.1.5"; + disabled = isPyPy; + + src = fetchPypi { + inherit pname version; + sha256 = "1239h6h67vg0wazg2qgv6m3hdim2gs66pl89lbnayk55bbnkwc0x"; + }; + + propagatedBuildInputs = [ pyasn1 ]; + + meta = with stdenv.lib; { + description = "A collection of ASN.1-based protocols modules"; + homepage = https://pypi.python.org/pypi/pyasn1-modules; + license = licenses.bsd3; + platforms = platforms.unix; # same as pyasn1 + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c549a3bad4a6..b9f62a1f34b9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15526,25 +15526,7 @@ in { pyasn1 = callPackage ../development/python-modules/pyasn1 { }; - pyasn1-modules = buildPythonPackage rec { - name = "pyasn1-modules-${version}"; - version = "0.0.8"; - disabled = isPyPy; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pyasn1-modules/${name}.tar.gz"; - sha256 = "0drqgw81xd3fxdlg89kgd79zzrabvfncvkbybi2wr6w2y4s1jmhh"; - }; - - propagatedBuildInputs = with self; [ pyasn1 ]; - - meta = { - description = "A collection of ASN.1-based protocols modules"; - homepage = https://pypi.python.org/pypi/pyasn1-modules; - license = licenses.bsd3; - platforms = platforms.unix; # same as pyasn1 - }; - }; + pyasn1-modules = callPackage ../development/python-modules/pyasn1-modules { }; pyaudio = buildPythonPackage rec { name = "python-pyaudio-${version}"; From f255de884b147fb6efc2b1ae95493f99d5512d2a Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:36:38 +0000 Subject: [PATCH 7/8] python.pkgs.ldap3: 1.0.4 -> 2.3 --- .../python-modules/ldap3/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 20 +--------------- 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 pkgs/development/python-modules/ldap3/default.nix diff --git a/pkgs/development/python-modules/ldap3/default.nix b/pkgs/development/python-modules/ldap3/default.nix new file mode 100644 index 000000000000..895272f351de --- /dev/null +++ b/pkgs/development/python-modules/ldap3/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchPypi, buildPythonPackage, gssapi, pyasn1 }: + +buildPythonPackage rec { + version = "2.3"; + pname = "ldap3"; + name = "${pname}-${version}"; + + src = fetchPypi { + inherit pname version; + sha256 = "1b36lwil4iflk2ay8gi663abpnfm8id7qg4n3jkmmqbnc1sv6mn0"; + }; + + buildInputs = [ gssapi ]; + + propagatedBuildInputs = [ pyasn1 ]; + + doCheck = false; # requires network + + meta = with stdenv.lib; { + homepage = https://pypi.python.org/pypi/ldap3; + description = "A strictly RFC 4510 conforming LDAP V3 pure Python client library"; + license = licenses.lgpl3; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b9f62a1f34b9..f7db34b4f61e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16856,25 +16856,7 @@ in { inherit (pkgs) openldap cyrus_sasl openssl; }; - ldap3 = buildPythonPackage rec { - version = "1.0.4"; - name = "ldap3-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/l/ldap3/${name}.tar.gz"; - sha256 = "0j4qqj9vq022hy7wfqn8s0j4vm2g6paabbzas1vbyspawvcfai98"; - }; - - buildInputs = with self; [ gssapi ]; - - propagatedBuildInputs = with self; [ pyasn1 ]; - - meta = { - homepage = https://pypi.python.org/pypi/ldap3; - description = "A strictly RFC 4510 conforming LDAP V3 pure Python client library"; - license = licenses.lgpl3; - }; - }; + ldap3 = callPackage ../development/python-modules/ldap3 {}; ptest = buildPythonPackage rec { name = pname + "-" + version; From 0433604f51966bc43ffdbb6d741665a5738c6b7d Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Thu, 2 Nov 2017 23:38:23 +0000 Subject: [PATCH 8/8] mitmproxy: 2.0.2 -> 2017-10-31 --- pkgs/tools/networking/mitmproxy/default.nix | 74 ++++----------------- 1 file changed, 12 insertions(+), 62 deletions(-) diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix index 7348cd7f1165..f96987a1300b 100644 --- a/pkgs/tools/networking/mitmproxy/default.nix +++ b/pkgs/tools/networking/mitmproxy/default.nix @@ -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; {