diff options
Diffstat (limited to 'pkgs/development/interpreters/perl/5.20/default.nix')
-rw-r--r-- | pkgs/development/interpreters/perl/5.20/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/perl/5.20/default.nix b/pkgs/development/interpreters/perl/5.20/default.nix index cafbe5141c16..bcf22654969d 100644 --- a/pkgs/development/interpreters/perl/5.20/default.nix +++ b/pkgs/development/interpreters/perl/5.20/default.nix @@ -28,13 +28,31 @@ stdenv.mkDerivation rec { sha256 = "17cvplgpxbm1hshxlkra2fldn4da1iap1lsnb04hdm8ply93k95i"; }; + # TODO: Add a "dev" output containing the header files. + outputs = [ "out" "man" ]; + + setOutputFlags = false; + patches = [ # Do not look in /usr etc. for dependencies. ./no-sys-dirs.patch + # Remove in 5.20.3 + ./perl-5.20.2-gcc5_fixes-1.patch ] ++ 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 = stdenv.lib.optional (stdenv.isDarwin && !stdenv.cc.nativeLibc) '' + 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 |