summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2017-02-21 17:55:26 +0100
committerVladimír Čunát <vcunat@gmail.com>2017-02-21 17:56:32 +0100
commitcab0b445be02665e2acd473a7c223f2293fb5580 (patch)
tree33cc16a26ee18d6879127c0d3e3b8f3533446fd9 /pkgs/development/interpreters
parent4b7215368ac16b862ee523bdc193e69c174c4942 (diff)
downloadnixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar.gz
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar.bz2
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar.lz
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar.xz
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.tar.zst
nixpkgs-cab0b445be02665e2acd473a7c223f2293fb5580.zip
python-3.4: fixup with glibc-2.25 (/cc #22874)
Upstream won't support it, but let me trick the code into behaving
as if glibc was older.  It seems 3.3 branch should be unaffected.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/python/cpython/3.4/default.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix
index 66bdd2a4227..72419f8e194 100644
--- a/pkgs/development/interpreters/python/cpython/3.4/default.nix
+++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix
@@ -57,7 +57,14 @@ in stdenv.mkDerivation {
 
   postPatch = optionalString (x11Support && (tix != null)) ''
     substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
-  '';
+  ''
+    # Avoid picking up getentropy() from glibc >= 2.25, as that would break
+    # on older kernels.  http://bugs.python.org/issue29157
+    + optionalString stdenv.isLinux
+      ''
+        substituteInPlace Python/random.c --replace 'defined(HAVE_GETENTROPY)' '0'
+        cat Python/random.c
+      '';
 
   preConfigure = ''
     for i in /usr /sw /opt /pkg; do	# improve purity