diff --git a/pkgs/development/interpreters/python/cpython/2.7/default.nix b/pkgs/development/interpreters/python/cpython/2.7/default.nix index 5c12d7cec55c..9d89e96383f5 100644 --- a/pkgs/development/interpreters/python/cpython/2.7/default.nix +++ b/pkgs/development/interpreters/python/cpython/2.7/default.nix @@ -140,7 +140,10 @@ let "ac_cv_computed_gotos=yes" "ac_cv_file__dev_ptmx=yes" "ac_cv_file__dev_ptc=yes" - ]; + ] + # Never even try to use lchmod on linux, + # don't rely on detecting glibc-isms. + ++ optional hostPlatform.isLinux "ac_cv_func_lchmod=no"; postConfigure = if hostPlatform.isCygwin then '' sed -i Makefile -e 's,PYTHONPATH="$(srcdir),PYTHONPATH="$(abs_srcdir),' diff --git a/pkgs/development/interpreters/python/cpython/3.4/default.nix b/pkgs/development/interpreters/python/cpython/3.4/default.nix index 0946f8743fbe..85c45a9d396f 100644 --- a/pkgs/development/interpreters/python/cpython/3.4/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.4/default.nix @@ -96,7 +96,10 @@ in stdenv.mkDerivation { "--without-ensurepip" "--with-system-expat" "--with-system-ffi" - ]; + ] + # Never even try to use lchmod on linux, + # don't rely on detecting glibc-isms. + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"; preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity diff --git a/pkgs/development/interpreters/python/cpython/3.5/default.nix b/pkgs/development/interpreters/python/cpython/3.5/default.nix index 22c55d302625..d67cc7286942 100644 --- a/pkgs/development/interpreters/python/cpython/3.5/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.5/default.nix @@ -90,7 +90,10 @@ in stdenv.mkDerivation { "--without-ensurepip" "--with-system-expat" "--with-system-ffi" - ]; + ] + # Never even try to use lchmod on linux, + # don't rely on detecting glibc-isms. + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"; preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity diff --git a/pkgs/development/interpreters/python/cpython/3.6/default.nix b/pkgs/development/interpreters/python/cpython/3.6/default.nix index 950a165a2f4a..ee9a0df9a8c4 100644 --- a/pkgs/development/interpreters/python/cpython/3.6/default.nix +++ b/pkgs/development/interpreters/python/cpython/3.6/default.nix @@ -113,7 +113,10 @@ in stdenv.mkDerivation { "ac_cv_computed_gotos=yes" "ac_cv_file__dev_ptmx=yes" "ac_cv_file__dev_ptc=yes" - ]; + ] + # Never even try to use lchmod on linux, + # don't rely on detecting glibc-isms. + ++ optional stdenv.hostPlatform.isLinux "ac_cv_func_lchmod=no"; preConfigure = '' for i in /usr /sw /opt /pkg; do # improve purity