2004-09-18 22:11:58 +01:00
|
|
|
{stdenv, fetchurl}:
|
2004-02-20 16:25:34 +00:00
|
|
|
|
2004-03-29 18:23:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2008-02-21 16:19:09 +00:00
|
|
|
name = "perl-5.10.0";
|
2004-02-20 16:25:34 +00:00
|
|
|
|
2003-11-05 12:17:48 +00:00
|
|
|
src = fetchurl {
|
2008-02-21 16:19:09 +00:00
|
|
|
url = mirror://cpan/src/perl-5.10.0.tar.gz;
|
|
|
|
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill";
|
2004-02-20 16:25:34 +00:00
|
|
|
};
|
|
|
|
|
2007-11-15 16:15:15 +00:00
|
|
|
patches = [
|
|
|
|
# This patch does the following:
|
|
|
|
# 1) Do use the PATH environment variable to find the `pwd' command.
|
|
|
|
# By default, Perl will only look for it in /lib and /usr/lib.
|
|
|
|
# !!! what are the security implications of this?
|
|
|
|
# 2) Force the use of <errno.h>, not /usr/include/errno.h, on Linux
|
|
|
|
# systems. (This actually appears to be due to a bug in Perl.)
|
|
|
|
./no-sys-dirs.patch
|
|
|
|
];
|
2005-03-10 12:49:37 +00:00
|
|
|
|
2009-04-22 18:37:21 +01:00
|
|
|
# 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
|
|
|
|
# contains the string "perl", Configure would select $out/lib.
|
2009-04-21 23:38:52 +01:00
|
|
|
configureFlags = ''
|
2009-04-22 18:44:44 +01:00
|
|
|
-de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib
|
|
|
|
${if stdenv ? glibc then "-Dusethreads" else ""}
|
2009-04-21 23:38:52 +01:00
|
|
|
'';
|
|
|
|
|
2009-05-06 15:03:26 +01:00
|
|
|
configureScript = "${stdenv.shell} ./Configure";
|
2009-04-22 18:37:21 +01:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
|
2009-10-02 20:05:39 +01:00
|
|
|
|
2009-04-22 18:37:21 +01:00
|
|
|
if test "$NIX_ENFORCE_PURITY" = "1"; then
|
2009-10-02 20:05:39 +01:00
|
|
|
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
|
|
|
|
configureFlags="$configureFlags -Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
|
2009-04-22 18:37:21 +01:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2009-07-26 23:47:33 +01:00
|
|
|
preBuild =
|
|
|
|
''
|
|
|
|
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
|
|
|
|
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
|
|
|
|
'';
|
2009-04-22 18:37:21 +01:00
|
|
|
|
2005-03-10 12:49:37 +00:00
|
|
|
setupHook = ./setup-hook.sh;
|
2003-11-05 12:17:48 +00:00
|
|
|
}
|