python*: upstream patches to fix with glibc-2.25

https://bugs.python.org/issue29157
The 3.6 release already contains the fix (from 3.5);
the branches in-between are claimed to be unaffected.
/cc #22874.
This commit is contained in:
Vladimír Čunát
2017-02-16 23:10:42 +01:00
parent 6c1ba72878
commit 110f136dc2
3 changed files with 26 additions and 1 deletions

View File

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