diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index 8cb07621ef16..e8eb3a70e374 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { # while at the same time erasing the PATH environment variable so it unconditionally # fails. The code in question is guarded by a check for Mac OS, but the patch below # doesn't have any runtime effect on other platforms. - postPatch = '' + postPatch = stdenv.lib.optional (stdenv.isDarwin && !stdenv.cc.nativeLibc) '' pwd="$(type -P pwd)" substituteInPlace dist/PathTools/Cwd.pm \ --replace "pwd_cmd = 'pwd'" "pwd_cmd = '$pwd'"