Added GHC 6.6.
note: the old GHC 6.4(.2?) version is still there. I reused the bootstrap-version to bootstrap GHC-6.6. And some other packages depend on the old GHC version as well. note: only use this package for building other packages. If you install it as an end-user, you'll only be able to use the default GHC libraries, because other libraries are only privately registered to this GHC version during a nix-build by hooks (which are not executed when you run GHC yourself as an end-user). Consequently, also added a newer version of uulib and uuagc. svn path=/nixpkgs/trunk/; revision=7346
This commit is contained in:
parent
4ae30fee90
commit
afde8e6270
15
pkgs/development/compilers/ghc-6.6/builder.sh
Normal file
15
pkgs/development/compilers/ghc-6.6/builder.sh
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
||||
|
||||
# Standard configure/make/make install
|
||||
genericBuild
|
18
pkgs/development/compilers/ghc-6.6/default.nix
Normal file
18
pkgs/development/compilers/ghc-6.6/default.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{stdenv, fetchurl, readline, ghc, perl, m4}:
|
||||
|
||||
stdenv.mkDerivation
|
||||
{
|
||||
name = "ghc-6.6";
|
||||
|
||||
src = map fetchurl [{ url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src.tar.bz2; md5 = "2427a8d7d14f86e0878df6b54938acf7"; }
|
||||
{ url = http://www.haskell.org/ghc/dist/6.6/ghc-6.6-src-extralibs.tar.bz2; md5 = "14b22fce36caffa509046361724bc119"; }
|
||||
];
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
buildInputs = [ghc readline perl m4];
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = { description = "The Glasgow Haskell Compiler v6.6"; };
|
||||
}
|
41
pkgs/development/compilers/ghc-6.6/setup-hook.sh
Normal file
41
pkgs/development/compilers/ghc-6.6/setup-hook.sh
Normal file
@ -0,0 +1,41 @@
|
||||
# Support dir for isolating GHC
|
||||
ghc_support=$TMPDIR/ghc-6.6-nix-support
|
||||
mkdir -p $ghc_support
|
||||
|
||||
# Create isolated package config
|
||||
packages_db=$ghc_support/package.conf
|
||||
cp $ghc/lib/ghc-*/package.conf $packages_db
|
||||
chmod +w $packages_db
|
||||
|
||||
# Generate wrappers for GHC that use the isolated package config
|
||||
makeWrapper() {
|
||||
wrapperName="$1"
|
||||
wrapper="$ghc_support/$wrapperName"
|
||||
shift #the other arguments are passed to the source app
|
||||
echo '#!'"$SHELL" > "$wrapper"
|
||||
echo "exec \"$ghc/bin/$wrapperName\" $@" '"$@"' > "$wrapper"
|
||||
chmod +x "$wrapper"
|
||||
}
|
||||
|
||||
makeWrapper "ghc" "-no-user-package-conf -package-conf" $packages_db
|
||||
makeWrapper "ghci" "-no-user-package-conf -package-conf" $packages_db
|
||||
makeWrapper "runghc" "-no-user-package-conf -package-conf" $packages_db
|
||||
makeWrapper "runhaskell" "-no-user-package-conf -package-conf" $packages_db
|
||||
makeWrapper "ghc-pkg" "--global --global-conf" $packages_db
|
||||
|
||||
# Add wrappers to search path
|
||||
export _PATH=$ghc_support:$_PATH
|
||||
|
||||
# Env hook to add packages to the package config
|
||||
addLibToPackageConf ()
|
||||
{
|
||||
local regscript=$1/nix-support/register-ghclib.sh
|
||||
if test -f $regscript; then
|
||||
local oldpath=$PATH
|
||||
export PATH=$ghc_support:$PATH
|
||||
sh $regscript $package_db
|
||||
export PATH=$oldpath
|
||||
fi
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addLibToPackageConf)
|
21
pkgs/development/libraries/haskell/uulib-ghc-6.6/builder.sh
Normal file
21
pkgs/development/libraries/haskell/uulib-ghc-6.6/builder.sh
Normal file
@ -0,0 +1,21 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
tar xzf "$src" &&
|
||||
cd uulib-* &&
|
||||
|
||||
|
||||
autoconf &&
|
||||
./configure --prefix=$out &&
|
||||
|
||||
|
||||
ghc --make Setup.hs -o setup -package Cabal &&
|
||||
./setup configure --prefix=$out --with-hc-pkg=ghc-pkg &&
|
||||
|
||||
|
||||
./setup build &&
|
||||
./setup install &&
|
||||
./setup register --gen-script &&
|
||||
|
||||
mkdir -p $out/nix-support/ &&
|
||||
cp register.sh $out/nix-support/register-ghclib.sh
|
11
pkgs/development/libraries/haskell/uulib-ghc-6.6/default.nix
Normal file
11
pkgs/development/libraries/haskell/uulib-ghc-6.6/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{stdenv, fetchurl, autoconf, ghc}:
|
||||
|
||||
stdenv.mkDerivation
|
||||
{
|
||||
name = "uulib-0.9.2-ghc-6.6";
|
||||
src = fetchurl { url = http://www.cs.uu.nl/~ariem/uulib-2006-10-30-src.tar.gz;
|
||||
md5 = "d26059447d45fa91f54eca38680be7b7";
|
||||
};
|
||||
builder = ./builder.sh;
|
||||
buildInputs = [ autoconf ghc ];
|
||||
}
|
@ -1,19 +1,14 @@
|
||||
{stdenv, fetchurl, ghc, uulib}:
|
||||
|
||||
#as long as cabal does not allow to specify which package.conf to use we create a wrapper
|
||||
stdenv.mkDerivation
|
||||
{
|
||||
name = "uuagc-0.9.2";
|
||||
|
||||
let {
|
||||
uulibGHC = (import ../../../compilers/ghc-wrapper) {
|
||||
libraries = [ uulib ];
|
||||
inherit stdenv ghc;
|
||||
};
|
||||
src = fetchurl { url = http://www.cs.uu.nl/~ariem/uuagc-0.9.2-src.tar.gz;
|
||||
md5 = "cbac92287c9c0a858ccbfa37615d9f5f";
|
||||
};
|
||||
|
||||
body = stdenv.mkDerivation {
|
||||
name = "uuagc-0.9.1";
|
||||
src = fetchurl {
|
||||
url = http://nix.cs.uu.nl/dist/tarballs/uuagc-0.9.1-src.tar.gz;
|
||||
md5 = "0f29cad75bd759696edc61c24d1a5db9";
|
||||
};
|
||||
buildInputs = [uulibGHC];
|
||||
};
|
||||
buildInputs = [ghc uulib];
|
||||
|
||||
meta = { description = "The UUAG Compiler"; };
|
||||
}
|
||||
|
@ -206,8 +206,8 @@ rec {
|
||||
|
||||
# Bring in a path as a source, filtering out all hidden Subversion
|
||||
# directories. TODO: filter out backup files (*~) etc.
|
||||
cleanSource = builtins.filterSource
|
||||
(name: baseNameOf (toString name) != ".svn");
|
||||
cleanSource = src: builtins.filterSource
|
||||
(name: baseNameOf (toString name) != ".svn") src;
|
||||
|
||||
# !!! obsolete
|
||||
substitute = ../build-support/substitute/substitute.sh;
|
||||
@ -681,6 +681,17 @@ rec {
|
||||
profiledCompiler = true;
|
||||
});
|
||||
|
||||
# ghc66boot = import ../development/compilers/ghc-6.6-boot {
|
||||
# inherit fetchurl stdenv perl readline;
|
||||
# m4 = gnum4;
|
||||
#};
|
||||
|
||||
ghc66 = import ../development/compilers/ghc-6.6 {
|
||||
inherit fetchurl stdenv readline perl;
|
||||
m4 = gnum4;
|
||||
ghc = ghcboot;
|
||||
};
|
||||
|
||||
ghc = import ../development/compilers/ghc {
|
||||
inherit fetchurl stdenv perl ncurses readline m4;
|
||||
gcc = stdenv.gcc;
|
||||
@ -1128,7 +1139,9 @@ rec {
|
||||
};
|
||||
|
||||
uuagc = import ../development/tools/haskell/uuagc {
|
||||
inherit fetchurl stdenv ghc uulib;
|
||||
inherit fetchurl stdenv;
|
||||
ghc = ghc66;
|
||||
uulib = uulib66;
|
||||
};
|
||||
|
||||
valgrind = import ../development/tools/misc/valgrind {
|
||||
@ -1787,6 +1800,11 @@ rec {
|
||||
inherit stdenv fetchurl ghc;
|
||||
};
|
||||
|
||||
uulib66 = import ../development/libraries/haskell/uulib-ghc-6.6 {
|
||||
inherit stdenv fetchurl autoconf;
|
||||
ghc = ghc66;
|
||||
};
|
||||
|
||||
wxHaskell = import ../development/libraries/haskell/wxHaskell {
|
||||
inherit fetchurl unzip ghc;
|
||||
stdenv = stdenvNew;
|
||||
|
Loading…
Reference in New Issue
Block a user