diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-07-26 21:48:17 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-07-26 21:48:17 +0000 |
commit | 4f5e00f6860d2cd63fd6254801479bfe743274aa (patch) | |
tree | 78706f442e917829489466d6462358e9c49e034f /pkgs/development | |
parent | 532fc4a05d4e16fd020f6764c0f12dfd2e86550a (diff) | |
download | nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar.gz nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar.bz2 nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar.lz nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar.xz nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.tar.zst nixlib-4f5e00f6860d2cd63fd6254801479bfe743274aa.zip |
Fixing perl so it builds well with stdenvNative in my arm-linux debian.
svn path=/nixpkgs/trunk/; revision=16467
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/interpreters/perl-5.10/default.nix | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/perl-5.10/default.nix b/pkgs/development/interpreters/perl-5.10/default.nix index a8b8dd536a75..e7b6af563d6f 100644 --- a/pkgs/development/interpreters/perl-5.10/default.nix +++ b/pkgs/development/interpreters/perl-5.10/default.nix @@ -1,5 +1,12 @@ {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 { name = "perl-5.10.0"; @@ -22,8 +29,10 @@ stdenv.mkDerivation { # "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. + # Miniperl needs -lm. perl needs -lrt. configureFlags = '' -de -Dcc=gcc -Uinstallusrbinperl -Dinstallstyle=lib/perl5 -Duseshrplib + -Dldflags='-lm -lrt' ${if stdenv ? glibc then "-Dusethreads" else ""} ''; @@ -41,11 +50,7 @@ stdenv.mkDerivation { fi ''; - preBuild = - '' - # Make Cwd work on NixOS (where we don't have a /bin/pwd). - substituteInPlace lib/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" - ''; + preBuild = if (stdenv.gcc.nativeTools) then preBuildNative else preBuildNoNative; setupHook = ./setup-hook.sh; } |