2004-09-18 23:11:58 +02:00
|
|
|
{stdenv, fetchurl}:
|
2004-02-20 17:25:34 +01:00
|
|
|
|
2004-03-29 19:23:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2008-02-21 17:19:09 +01:00
|
|
|
name = "perl-5.10.0";
|
2004-02-20 17:25:34 +01:00
|
|
|
|
2003-11-05 13:17:48 +01:00
|
|
|
src = fetchurl {
|
2008-02-21 17:19:09 +01:00
|
|
|
url = mirror://cpan/src/perl-5.10.0.tar.gz;
|
|
|
|
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill";
|
2004-02-20 17:25:34 +01:00
|
|
|
};
|
|
|
|
|
2007-11-15 17:15:15 +01: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 13:49:37 +01:00
|
|
|
|
2009-04-22 19:37:21 +02: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-22 00:38:52 +02:00
|
|
|
configureFlags = ''
|
2009-04-22 19:44:44 +02:00
|
|
|
-de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib
|
|
|
|
${if stdenv ? glibc then "-Dusethreads" else ""}
|
2009-04-22 00:38:52 +02:00
|
|
|
'';
|
|
|
|
|
2009-05-06 16:03:26 +02:00
|
|
|
configureScript = "${stdenv.shell} ./Configure";
|
2009-04-22 19:37:21 +02:00
|
|
|
|
|
|
|
dontAddPrefix = true;
|
|
|
|
|
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
|
|
|
|
|
|
|
|
if test "$NIX_ENFORCE_PURITY" = "1"; then
|
|
|
|
GLIBC=$(cat $NIX_GCC/nix-support/orig-libc)
|
|
|
|
configureFlags="$configureFlags -Dlocincpth=$GLIBC/include -Dloclibpth=$GLIBC/lib"
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
2009-07-27 00:47:33 +02: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 19:37:21 +02:00
|
|
|
|
2005-03-10 13:49:37 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
2003-11-05 13:17:48 +01:00
|
|
|
}
|