Updated the expression for EHC/UHC.

This is not yet properly tested, but it should be an improvement over
what was there before ...

svn path=/nixpkgs/trunk/; revision=21435
This commit is contained in:
Andres Löh 2010-04-29 17:35:09 +00:00
parent 7d2ae46bce
commit b3224edee3
2 changed files with 25 additions and 49 deletions

View File

@ -1,60 +1,36 @@
{stdenv, coreutils, fetchsvn, m4, libtool, ghc, uulib, uuagc, llvm}:
{stdenv, coreutils, glibc, fetchsvn, m4, libtool, ghc, uulib, uuagc, mtl, network, binary, llvm, fgl}:
stdenv.mkDerivation (rec {
name = "ehc-svn-1042";
revision = "1996";
name = "ehc-svn-${revision}";
homepage = "http://www.cs.uu.nl/wiki/Ehc/WebHome/";
src = fetchsvn {
url = https://svn.cs.uu.nl:12443/repos/EHC/trunk/EHC;
rev = "1042";
sha256 = "7a9e5d1d57825caa4664686d9a5c0d9b5ebb870095817d77bb7b97869718ed5b";
url = https://subversion.cs.uu.nl/repos/project.UHC.pub/trunk/EHC;
rev = revision;
sha256 = "92c658cd15dd513ccaeb81341f2680056276a46d053330f66c0214d10a6729e2";
};
buildInputs = [coreutils m4 ghc libtool uulib uuagc llvm];
propagatedBuildInputs = [mtl network binary fgl];
buildInputs = [coreutils m4 ghc libtool uulib uuagc];
# --force is required because the dependencies are not properly
# detected by Nix, being located in several package config files
configureFlags = [
"--with-cabal-config-options=--ghc-pkg-options=--force"
"--with-cpp-ehc-options=-I${glibc}/include"
];
# EHC builds packages during compilation; these are by default
# installed in the user-specific package config file. We do not
# want that, and hack the build process to use a temporary package
# configuration file instead.
preConfigure = ''
find src -name files\*.mk -exec sed -i -- "s/--user//g" '{}' \;
p=`pwd`/ehc-local-packages
echo '[]' > $p
sed -i "s|--user|--package-db=$p|g" mk/shared.mk.in
sed -i "s|-fglasgow-exts|-fglasgow-exts -package-conf=$p|g" mk/shared.mk.in
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
echo "RTS_GCC_CC_OPTS := -std=gnu99" >> mk/shared.mk.in
'';
buildFlags = "100/ehc 100/ehclib";
installPhase = ''
cd bin
# install executables
echo "installing executables..."
mkdir -p $out/bin-ehc
for i in *; do
if [[ -d $i ]]; then
cp $i/ehc $out/bin-ehc/ehc-$i
fi;
done
# install runtime support
cp -r ../install/* $out
# install prelude
echo "installing prelude..."
mkdir -p $out/lib-ehc
for i in *; do
if [[ -d ../build/$i/ehclib/ehcbase ]]; then
mkdir -p $out/lib-ehc/$i
cp -r ../build/$i/ehclib/ehcbase $out/lib-ehc/$i
fi;
done
# generate wrappers
echo "generating wrappers..."
mkdir -p $out/bin
for i in *; do
if [[ -d $i ]]; then
echo '#!'"$SHELL" > $out/bin/ehc-$i
echo "exec \"$out/bin-ehc/ehc-$i\" --use-inplace=0 -P $out/lib-ehc/$i/ehcbase" '"$@"' >> $out/bin/ehc-$i
chmod 751 $out/bin/ehc-$i
fi;
done
'';
meta = {

View File

@ -843,8 +843,8 @@ rec {
# Compilers.
ehc = import ../development/compilers/ehc {
inherit ghc uulib uuagc;
inherit (pkgs) fetchsvn stdenv coreutils m4 libtool llvm;
inherit ghc uulib uuagc mtl network binary fgl;
inherit (pkgs) fetchsvn stdenv coreutils glibc m4 libtool llvm;
};
helium = import ../development/compilers/helium {