diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index f18fe181a7b0..525ef8c1c6d9 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -370,7 +370,7 @@ in with passthru; stdenv.mkDerivation { # Add CPython specific setup-hook that configures distutils.sysconfig to # always load sysconfigdata from host Python. - postFixup = '' + postFixup = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) '' cat << "EOF" >> "$out/nix-support/setup-hook" ${sysconfigdataHook} EOF