Fixing perl so it builds well with stdenvNative in my arm-linux debian.
svn path=/nixpkgs/trunk/; revision=16467
This commit is contained in:
parent
532fc4a05d
commit
4f5e00f686
|
@ -1,5 +1,12 @@
|
||||||
{stdenv, fetchurl}:
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
|
let
|
||||||
|
preBuildNoNative = ''
|
||||||
|
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
|
||||||
|
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
|
||||||
|
'';
|
||||||
|
preBuildNative = "";
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "perl-5.10.0";
|
name = "perl-5.10.0";
|
||||||
|
|
||||||
|
@ -22,8 +29,10 @@ stdenv.mkDerivation {
|
||||||
# "installstyle" option to ensure that modules are put under
|
# "installstyle" option to ensure that modules are put under
|
||||||
# $out/lib/perl5 - this is the general default, but because $out
|
# $out/lib/perl5 - this is the general default, but because $out
|
||||||
# contains the string "perl", Configure would select $out/lib.
|
# contains the string "perl", Configure would select $out/lib.
|
||||||
|
# Miniperl needs -lm. perl needs -lrt.
|
||||||
configureFlags = ''
|
configureFlags = ''
|
||||||
-de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib
|
-de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib
|
||||||
|
-Dldflags='-lm -lrt'
|
||||||
${if stdenv ? glibc then "-Dusethreads" else ""}
|
${if stdenv ? glibc then "-Dusethreads" else ""}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -41,11 +50,7 @@ stdenv.mkDerivation {
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preBuild =
|
preBuild = if (stdenv.gcc.nativeTools) then preBuildNative else preBuildNoNative;
|
||||||
''
|
|
||||||
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
|
|
||||||
substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
|
|
||||||
'';
|
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue