* Use the new patchelf to build GHC in a fully pure way. Should be

checked on NixOS.

svn path=/nixpkgs/trunk/; revision=3993
This commit is contained in:
Eelco Dolstra 2005-10-02 18:48:08 +00:00
parent e11a1e014c
commit efdb847441
4 changed files with 30 additions and 13 deletions

View File

@ -1,14 +1,15 @@
{stdenv, fetchurl, perl}:
assert perl != null;
{stdenv, fetchurl, perl, patchelf, readline, ncurses}:
assert stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "ghc-6.2.1";
name = "ghc-6.4.1";
builder = ./boot.sh;
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.2.1-i386-unknown-linux.tar.bz2;
md5 = "48d9d6b9f7bf1f15d69e8bd732ee254c";
url = http://www.haskell.org/ghc/dist/6.4.1/ghc-6.4.1-i386-unknown-linux.tar.bz2;
md5 = "9cd18a8e946da91b373b8ec855cd842e";
};
buildInputs = [perl];
buildInputs = [perl patchelf];
propagatedBuildInputs = [readline ncurses];
inherit readline ncurses;
}

View File

@ -0,0 +1,11 @@
source $stdenv/setup
postBuild=postBuild
postBuild () {
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
find . -type f -perm +100 \
-exec patchelf --interpreter $glibc/lib/ld-linux.so.* \
--set-rpath "$readline/lib:$ncurses/lib" {} \;
}
genericBuild

View File

@ -1,12 +1,10 @@
{stdenv, fetchurl, perl, ghc, m4}:
assert perl != null && ghc != null && m4 != null;
stdenv.mkDerivation {
name = "ghc-6.2.1";
name = "ghc-6.4.1";
src = fetchurl {
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.2.1-src.tar.bz2;
md5 = "fa9f90fd6b8852679c5fc16509e94d7a";
url = http://www.haskell.org/ghc/dist/6.4.1/ghc-6.4.1-src.tar.bz2;
md5 = "fd289bc7c3afa272ff831a71a50b5b00";
};
buildInputs = [perl ghc m4];
}

View File

@ -287,6 +287,10 @@ rec {
inherit fetchurl stdenv;
};
patchelfNew = (import ../development/tools/misc/patchelf/new.nix) {
inherit fetchurl stdenv;
};
gnum4 = (import ../development/tools/misc/gnum4) {
inherit fetchurl stdenv;
};
@ -549,7 +553,9 @@ rec {
#};
ghcboot = (import ../development/compilers/ghc/boot.nix) {
inherit fetchurl stdenv perl;
inherit fetchurl stdenv perl ncurses;
readline = readline4;
patchelf = patchelfNew;
};
ghc = (import ../development/compilers/ghc) {
@ -1548,6 +1554,7 @@ rec {
inherit (xlibs) libXt libXp libXext libX11;
inherit (gtkLibs) glib pango atk gtk;
libstdcpp5 = gcc33.gcc;
# patchelf = patchelfNew;
};
eclipse = (import ../applications/editors/eclipse) {