* make ghcboot work on 64-bit

svn path=/nixpkgs/trunk/; revision=9067
This commit is contained in:
Andres Löh 2007-08-07 23:59:08 +00:00
parent db0e9e16c9
commit 6710a5e02f
3 changed files with 16 additions and 10 deletions

View file

@ -1,15 +1,20 @@
{stdenv, fetchurl, perl, readline, ncurses}:
{stdenv, fetchurl, perl, readline, ncurses, gmp ? null}:
assert stdenv.system == "i686-linux";
assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
stdenv.mkDerivation {
name = "ghc-6.4.2";
builder = ./boot.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.4.2-i386-unknown-linux.tar.bz2;
md5 = "092fe2e25dab22b926babe97cc77db1f";
};
src = if stdenv.system == "i686-linux" then
(fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.4.2-i386-unknown-linux.tar.bz2;
md5 = "092fe2e25dab22b926babe97cc77db1f";
}) else
(fetchurl {
url = http://haskell.org/ghc/dist/6.4.2/ghc-6.4.2-x86_64-unknown-linux.tar.bz2;
md5 = "8f5fe48798f715cd05214a10987bf6d5";
});
buildInputs = [perl];
propagatedBuildInputs = [readline ncurses];
inherit readline ncurses;
propagatedBuildInputs = [readline ncurses (if stdenv.system == "x86_64-linux" then gmp else null)];
inherit readline ncurses gmp;
}

View file

@ -4,7 +4,7 @@ postBuild=postBuild
postBuild () {
find . -type f -perm +100 \
-exec patchelf --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
--set-rpath "$readline/lib:$ncurses/lib" {} \;
--set-rpath "$readline/lib:$ncurses/lib:$gmp/lib" {} \;
}
genericBuild

View file

@ -770,7 +770,8 @@ rec {
ghcboot = lowPrio (appendToName "boot" (import ../development/compilers/ghc/boot.nix {
inherit fetchurl stdenv perl ncurses;
readline = readline4;
readline = if stdenv.system == "i686-linux" then readline4 else readline;
gmp = if stdenv.system == "x86_64-linux" then gmp else null;
}));
/*