summary refs log tree commit diff
path: root/pkgs/tools/networking/mitmproxy/default.nix
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2017-12-31 13:50:17 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2017-12-31 13:50:17 +0100
commit8a255d73b4d1418b8395350435aecfcf403430f2 (patch)
treec96fb3efb0b371dcfa0dce1c90e5654f37195cbe /pkgs/tools/networking/mitmproxy/default.nix
parent9d57dac3a0de7dcdf2d170344d25bfc69fa05307 (diff)
downloadnixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar.gz
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar.bz2
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar.lz
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar.xz
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.tar.zst
nixlib-8a255d73b4d1418b8395350435aecfcf403430f2.zip
mitmproxy: fix build
Diffstat (limited to 'pkgs/tools/networking/mitmproxy/default.nix')
-rw-r--r--pkgs/tools/networking/mitmproxy/default.nix28
1 files changed, 25 insertions, 3 deletions
diff --git a/pkgs/tools/networking/mitmproxy/default.nix b/pkgs/tools/networking/mitmproxy/default.nix
index f96987a1300b..36874a812812 100644
--- a/pkgs/tools/networking/mitmproxy/default.nix
+++ b/pkgs/tools/networking/mitmproxy/default.nix
@@ -1,6 +1,28 @@
 { stdenv, fetchpatch, fetchFromGitHub, fetchurl, python3, glibcLocales }:
 
-python3.pkgs.buildPythonPackage rec {
+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 {
   baseName = "mitmproxy";
   name = "${baseName}-unstable-2017-10-31";
 
@@ -17,7 +39,7 @@ python3.pkgs.buildPythonPackage rec {
     LC_CTYPE=en_US.UTF-8 pytest -k 'not test_echo and not test_find_unclaimed_URLs '
   '';
 
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = [
     blinker click certifi cryptography
     h2 hyperframe
     kaitaistruct passlib pyasn1 pyopenssl
@@ -25,7 +47,7 @@ python3.pkgs.buildPythonPackage rec {
     urwid brotlipy sortedcontainers ldap3
   ];
 
-  buildInputs = with python3.pkgs; [
+  buildInputs = [
     beautifulsoup4 flask pytest pytestrunner glibcLocales
   ];