* Perl 5.10.1.

svn path=/nixpkgs/branches/stdenv-updates/; revision=19517
This commit is contained in:
Eelco Dolstra 2010-01-18 12:09:51 +00:00
parent a9634c0c5a
commit fa5a119fcd

View File

@ -3,18 +3,21 @@
}: }:
let let
preBuildNoNative = ''
preBuildNoNative =
''
# Make Cwd work on NixOS (where we don't have a /bin/pwd). # Make Cwd work on NixOS (where we don't have a /bin/pwd).
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
''; '';
preBuildNative = "";
in in
stdenv.mkDerivation {
name = "perl-5.10.0"; stdenv.mkDerivation rec {
name = "perl-5.10.1";
src = fetchurl { src = fetchurl {
url = mirror://cpan/src/perl-5.10.0.tar.gz; url = "mirror://cpan/src/${name}.tar.gz";
sha256 = "0bivbz15x02m02gqs6hs77cgjr2msfrhnvp5xqk359jg6w6llill"; sha256 = "0dagnhjgmslfx1jawz986nvc3jh1klk7mn2l8djdca1b9gm2czyb";
}; };
patches = [ patches = [
@ -57,8 +60,7 @@ stdenv.mkDerivation {
${if stdenv.system == "armv5tel-linux" then "-Dldflags=\"-lm -lrt\"" else ""}; ${if stdenv.system == "armv5tel-linux" then "-Dldflags=\"-lm -lrt\"" else ""};
''; '';
preBuild = if (stdenv ? gcc && stdenv.gcc.nativeTools) then preBuild = stdenv.lib.optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools)) preBuildNoNative;
preBuildNative else preBuildNoNative;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
} }