summary refs log tree commit diff
path: root/pkgs/development/interpreters/python/cpython/2.7/boot.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/python/cpython/2.7/boot.nix')
-rw-r--r--pkgs/development/interpreters/python/cpython/2.7/boot.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python/cpython/2.7/boot.nix b/pkgs/development/interpreters/python/cpython/2.7/boot.nix
index 7d6f2541d3d1..976d30819dbe 100644
--- a/pkgs/development/interpreters/python/cpython/2.7/boot.nix
+++ b/pkgs/development/interpreters/python/cpython/2.7/boot.nix
@@ -43,6 +43,15 @@ stdenv.mkDerivation rec {
       ./deterministic-build.patch
     ];
 
+  # Hack hack hack to stop shit from failing from a missing _scproxy on Darwin. Since
+  # we only use this python for bootstrappy things, it doesn't really matter if it
+  # doesn't have perfect proxy support in urllib :) this just makes it fall back on env
+  # vars instead of attempting to read the proxy configuration automatically, so not a
+  # huge loss even if for whatever reason we did want proxy support.
+  postPatch = ''
+    substituteInPlace Lib/urllib.py --replace "if sys.platform == 'darwin'" "if False"
+  '';
+
   DETERMINISTIC_BUILD = 1;
 
   preConfigure = ''