* 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:
@@ -1,14 +1,15 @@
|
|||||||
{stdenv, fetchurl, perl}:
|
{stdenv, fetchurl, perl, patchelf, readline, ncurses}:
|
||||||
|
|
||||||
assert perl != null;
|
|
||||||
|
|
||||||
assert stdenv.system == "i686-linux";
|
assert stdenv.system == "i686-linux";
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ghc-6.2.1";
|
name = "ghc-6.4.1";
|
||||||
|
builder = ./boot.sh;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.2.1-i386-unknown-linux.tar.bz2;
|
url = http://www.haskell.org/ghc/dist/6.4.1/ghc-6.4.1-i386-unknown-linux.tar.bz2;
|
||||||
md5 = "48d9d6b9f7bf1f15d69e8bd732ee254c";
|
md5 = "9cd18a8e946da91b373b8ec855cd842e";
|
||||||
};
|
};
|
||||||
buildInputs = [perl];
|
buildInputs = [perl patchelf];
|
||||||
|
propagatedBuildInputs = [readline ncurses];
|
||||||
|
inherit readline ncurses;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -1,12 +1,10 @@
|
|||||||
{stdenv, fetchurl, perl, ghc, m4}:
|
{stdenv, fetchurl, perl, ghc, m4}:
|
||||||
|
|
||||||
assert perl != null && ghc != null && m4 != null;
|
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ghc-6.2.1";
|
name = "ghc-6.4.1";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://nix.cs.uu.nl/dist/tarballs/ghc-6.2.1-src.tar.bz2;
|
url = http://www.haskell.org/ghc/dist/6.4.1/ghc-6.4.1-src.tar.bz2;
|
||||||
md5 = "fa9f90fd6b8852679c5fc16509e94d7a";
|
md5 = "fd289bc7c3afa272ff831a71a50b5b00";
|
||||||
};
|
};
|
||||||
buildInputs = [perl ghc m4];
|
buildInputs = [perl ghc m4];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -287,6 +287,10 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patchelfNew = (import ../development/tools/misc/patchelf/new.nix) {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
gnum4 = (import ../development/tools/misc/gnum4) {
|
gnum4 = (import ../development/tools/misc/gnum4) {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
@@ -549,7 +553,9 @@ rec {
|
|||||||
#};
|
#};
|
||||||
|
|
||||||
ghcboot = (import ../development/compilers/ghc/boot.nix) {
|
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) {
|
ghc = (import ../development/compilers/ghc) {
|
||||||
@@ -1548,6 +1554,7 @@ rec {
|
|||||||
inherit (xlibs) libXt libXp libXext libX11;
|
inherit (xlibs) libXt libXp libXext libX11;
|
||||||
inherit (gtkLibs) glib pango atk gtk;
|
inherit (gtkLibs) glib pango atk gtk;
|
||||||
libstdcpp5 = gcc33.gcc;
|
libstdcpp5 = gcc33.gcc;
|
||||||
|
# patchelf = patchelfNew;
|
||||||
};
|
};
|
||||||
|
|
||||||
eclipse = (import ../applications/editors/eclipse) {
|
eclipse = (import ../applications/editors/eclipse) {
|
||||||
|
|||||||
Reference in New Issue
Block a user