From 2f1945dcd3999a6f0313409337794dbd385e04a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 22 Feb 2017 17:34:33 +0100 Subject: [PATCH] python-3.6: fix random numbers with glibc-2.25 I missed this upstream patch. /cc #22874. --- .../interpreters/python/cpython/3.6/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 795bd7467253..42f8d109af2f 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -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'" '';