diff --git a/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch new file mode 100644 index 000000000000..51e3cb6d7f11 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/3.7/darwin-libutil.patch @@ -0,0 +1,23 @@ +diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c +index c3682b4..16826c6 100644 +--- a/Modules/posixmodule.c ++++ b/Modules/posixmodule.c +@@ -5880,15 +5880,13 @@ error: + #if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX) + #ifdef HAVE_PTY_H + #include +-#else ++#endif + #ifdef HAVE_LIBUTIL_H + #include +-#else ++#endif + #ifdef HAVE_UTIL_H + #include +-#endif /* HAVE_UTIL_H */ +-#endif /* HAVE_LIBUTIL_H */ +-#endif /* HAVE_PTY_H */ ++#endif + #ifdef HAVE_STROPTS_H + #include + #endif diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index e75bd0a09875..c1c90d35815c 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -103,10 +103,7 @@ in with passthru; stdenv.mkDerivation { ./3.5/ld_library_path.patch ] ++ optionals (isPy37 || isPy38) [ # Fix darwin build https://bugs.python.org/issue34027 - (fetchpatch { - url = https://bugs.python.org/file47666/darwin-libutil.patch; - sha256 = "0242gihnw3wfskl4fydp2xanpl8k5q7fj4dp7dbbqf46a4iwdzpa"; - }) + ./3.7/darwin-libutil.patch ] ++ optionals (isPy3k && hasDistutilsCxxPatch) [ # Fix for http://bugs.python.org/issue1222585 # Upstream distutils is calling C compiler to compile C++ code, which