diff options
author | Jude Taylor <me@jude.bio> | 2015-06-11 17:58:26 -0700 |
---|---|---|
committer | Jude Taylor <me@jude.bio> | 2015-06-18 12:37:41 -0700 |
commit | fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c (patch) | |
tree | 3488761b783cedf8a7c90f1a51c1435430c35cd4 /pkgs/development/interpreters/perl | |
parent | 5e63669520dc1ac22a16ddd7fef468f38ca0b221 (diff) | |
download | nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.gz nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.bz2 nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.lz nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.xz nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.tar.zst nixlib-fa9c81f69468098e0dd0ca79ea4d2ef74ec6bc0c.zip |
pure darwin stdenv
Diffstat (limited to 'pkgs/development/interpreters/perl')
-rw-r--r-- | pkgs/development/interpreters/perl/5.16/default.nix | 11 | ||||
-rw-r--r-- | pkgs/development/interpreters/perl/5.20/default.nix | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/perl/5.16/default.nix b/pkgs/development/interpreters/perl/5.16/default.nix index 9ed3aa54f517..568025edfd4c 100644 --- a/pkgs/development/interpreters/perl/5.16/default.nix +++ b/pkgs/development/interpreters/perl/5.16/default.nix @@ -24,6 +24,17 @@ stdenv.mkDerivation rec { ++ lib.optional stdenv.isSunOS ./ld-shared.patch ++ lib.optional stdenv.isDarwin [ ./cpp-precomp.patch ./no-libutil.patch ] ; + # There's an annoying bug on sandboxed Darwin in Perl's Cwd.pm where it looks for pwd + # in /bin/pwd and /usr/bin/pwd and then falls back on just "pwd" if it can't get them + # 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 = '' + pwd="$(type -P pwd)" + substituteInPlace dist/Cwd/Cwd.pm \ + --replace "pwd_cmd = 'pwd'" "pwd_cmd = '$pwd'" + ''; + # Build a thread-safe Perl with a dynamic libperls.o. We need the # "installstyle" option to ensure that modules are put under # $out/lib/perl5 - this is the general default, but because $out diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index 0ad955d03630..bfdb09e779a1 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -35,6 +35,17 @@ stdenv.mkDerivation rec { ++ optional stdenv.isSunOS ./ld-shared.patch ++ stdenv.lib.optional stdenv.isDarwin [ ./cpp-precomp.patch ./no-libutil.patch ] ; + # There's an annoying bug on sandboxed Darwin in Perl's Cwd.pm where it looks for pwd + # in /bin/pwd and /usr/bin/pwd and then falls back on just "pwd" if it can't get them + # 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 = '' + pwd="$(type -P pwd)" + substituteInPlace dist/PathTools/Cwd.pm \ + --replace "pwd_cmd = 'pwd'" "pwd_cmd = '$pwd'" + ''; + # Build a thread-safe Perl with a dynamic libperls.o. We need the # "installstyle" option to ensure that modules are put under # $out/lib/perl5 - this is the general default, but because $out |