python-3.6: fix random numbers with glibc-2.25

I missed this upstream patch. /cc #22874.
This commit is contained in:
Vladimír Čunát 2017-02-22 17:34:33 +01:00
parent fe8aa284c2
commit 2f1945dcd3
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl
{ stdenv, fetchurl, fetchpatch
, glibc
, bzip2
, gdbm
@ -55,6 +55,14 @@ in stdenv.mkDerivation {
substituteInPlace configure --replace '-Wl,-stack_size,1000000' ' '
'';
patches = [
(fetchpatch {
name = "glibc-2.25-failed-to-get-random-numbers.patch";
url = https://github.com/python/cpython/commit/ff558f5aba4.patch;
sha256 = "1k12gpn69np94cm942vaf40sv7gsxqf20rv1m3parzgi1gs4hqa3";
})
];
postPatch = optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';