* porting changes from ghc-6.8.2 nix expression back to 6.6.1

* cleaning up a bit

svn path=/nixpkgs/trunk/; revision=10103
This commit is contained in:
Andres Löh 2008-01-09 13:08:36 +00:00
parent 35d05e3cc1
commit 7f402451ec
5 changed files with 33 additions and 66 deletions

View file

@ -1,26 +0,0 @@
source $stdenv/setup
# Setup isolated package management
postInstall()
{
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
}
postInstall=postInstall
configureFlags="--with-gmp-libraries=$gmp/lib --with-readline-libraries=\"$readline/lib\""
preConfigure()
{
chmod u+x rts/gmp/configure
# still requires a hack for ncurses
sed -i "s|^\(library-dirs.*$\)|\1 \"$ncurses/lib\"|" libraries/readline/package.conf.in
}
preConfigure=preConfigure
# Standard configure/make/make install
genericBuild

View file

@ -1,6 +1,6 @@
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
stdenv.mkDerivation {
stdenv.mkDerivation (rec {
name = "ghc-6.6.1";
src = map fetchurl [
@ -12,15 +12,34 @@ stdenv.mkDerivation {
}
];
builder = ./builder.sh;
buildInputs = [ghc readline perl m4];
buildInputs = [ghc readline perl m4 gmp];
setupHook = ./setup-hook.sh;
meta = {
description = "The Glasgow Haskell Compiler v6.6.1";
description = "The Glasgow Haskell Compiler";
};
postInstall = ''
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
'';
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"
"--with-readline-libraries=${readline}/lib"
"--with-gmp-includes=${gmp}/include"
"--with-gcc=${gcc}/bin/gcc"
];
preConfigure = ''
# still requires a hack for ncurses
sed -i "s|^\(library-dirs.*$\)|\1 \"${ncurses}/lib\"|" libraries/readline/package.conf.in
'';
inherit (stdenv) gcc;
inherit readline gmp ncurses;
}
})

View file

@ -1,26 +0,0 @@
source $stdenv/setup
# Setup isolated package management
postInstall()
{
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
}
postInstall=postInstall
configureFlags="--with-gmp-libraries=$gmp/lib --with-readline-libraries=\"$readline/lib\""
preConfigure()
{
chmod u+x rts/gmp/configure
# still requires a hack for ncurses
sed -i "s|^\(library-dirs.*$\)|\1 \"$ncurses/lib\"|" libraries/readline/package.conf.in
}
preConfigure=preConfigure
# Standard configure/make/make install
genericBuild

View file

@ -21,13 +21,13 @@ stdenv.mkDerivation (rec {
description = "The Glasgow Haskell Compiler";
};
postInstall = "
ensureDir \"$out/nix-support\"
echo \"# Path to the GHC compiler directory in the store\" > $out/nix-support/setup-hook
echo \"ghc=$out\" >> $out/nix-support/setup-hook
echo \"\" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
";
postInstall = ''
ensureDir "$out/nix-support"
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
echo "ghc=$out" >> $out/nix-support/setup-hook
echo "" >> $out/nix-support/setup-hook
cat $setupHook >> $out/nix-support/setup-hook
'';
configureFlags=[
"--with-gmp-libraries=${gmp}/lib"

View file

@ -1,5 +1,5 @@
# Support dir for isolating GHC
ghc_support=$TMPDIR/ghc-6.6-nix-support
ghc_support=$TMPDIR/ghc-6.8-nix-support
mkdir -p $ghc_support
# Create isolated package config