* 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:
@@ -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
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
|
{stdenv, fetchurl, readline, ghc, perl, m4, gmp, ncurses}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation (rec {
|
||||||
name = "ghc-6.6.1";
|
name = "ghc-6.6.1";
|
||||||
|
|
||||||
src = map fetchurl [
|
src = map fetchurl [
|
||||||
@@ -12,15 +12,34 @@ stdenv.mkDerivation {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
builder = ./builder.sh;
|
buildInputs = [ghc readline perl m4 gmp];
|
||||||
|
|
||||||
buildInputs = [ghc readline perl m4];
|
|
||||||
|
|
||||||
setupHook = ./setup-hook.sh;
|
setupHook = ./setup-hook.sh;
|
||||||
|
|
||||||
meta = {
|
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;
|
inherit readline gmp ncurses;
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -21,13 +21,13 @@ stdenv.mkDerivation (rec {
|
|||||||
description = "The Glasgow Haskell Compiler";
|
description = "The Glasgow Haskell Compiler";
|
||||||
};
|
};
|
||||||
|
|
||||||
postInstall = "
|
postInstall = ''
|
||||||
ensureDir \"$out/nix-support\"
|
ensureDir "$out/nix-support"
|
||||||
echo \"# Path to the GHC compiler directory in the store\" > $out/nix-support/setup-hook
|
echo "# Path to the GHC compiler directory in the store" > $out/nix-support/setup-hook
|
||||||
echo \"ghc=$out\" >> $out/nix-support/setup-hook
|
echo "ghc=$out" >> $out/nix-support/setup-hook
|
||||||
echo \"\" >> $out/nix-support/setup-hook
|
echo "" >> $out/nix-support/setup-hook
|
||||||
cat $setupHook >> $out/nix-support/setup-hook
|
cat $setupHook >> $out/nix-support/setup-hook
|
||||||
";
|
'';
|
||||||
|
|
||||||
configureFlags=[
|
configureFlags=[
|
||||||
"--with-gmp-libraries=${gmp}/lib"
|
"--with-gmp-libraries=${gmp}/lib"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Support dir for isolating GHC
|
# 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
|
mkdir -p $ghc_support
|
||||||
|
|
||||||
# Create isolated package config
|
# Create isolated package config
|
||||||
|
|||||||
Reference in New Issue
Block a user