2008-03-17 12:59:12 +01:00
|
|
|
{stdenv, coreutils, fetchsvn, m4, libtool, ghc, uulib, uuagc, llvm}:
|
2008-03-13 19:02:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation (rec {
|
2008-03-17 12:59:12 +01:00
|
|
|
name = "ehc-svn-1036";
|
2008-03-13 19:02:48 +01:00
|
|
|
homepage = "http://www.cs.uu.nl/wiki/Ehc/WebHome/";
|
|
|
|
|
|
|
|
src = fetchsvn {
|
|
|
|
url = https://svn.cs.uu.nl:12443/repos/EHC/trunk/EHC;
|
2008-03-17 12:59:12 +01:00
|
|
|
rev = "1037";
|
|
|
|
sha256 = "b2388cfadeb26ce716ff355fbdd73ba2e30219c5b423fbd609355b420300644c";
|
2008-03-13 19:02:48 +01:00
|
|
|
};
|
|
|
|
|
2008-03-17 12:59:12 +01:00
|
|
|
buildInputs = [coreutils m4 ghc libtool uulib uuagc llvm];
|
2008-03-13 19:02:48 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
find src -name files\*.mk -exec sed -i -- "s/--user//g" '{}' \;
|
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
|
2008-03-17 12:59:12 +01:00
|
|
|
echo "RTS_GCC_CC_OPTS := -std=gnu99" >> mk/shared.mk.in
|
2008-03-13 19:02:48 +01:00
|
|
|
'';
|
|
|
|
|
2008-03-17 12:59:12 +01:00
|
|
|
buildFlags = "100/ehc 100/ehclib";
|
2008-03-13 19:02:48 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
cd bin
|
2008-03-17 12:59:12 +01:00
|
|
|
|
|
|
|
# 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
|
2008-03-13 19:02:48 +01:00
|
|
|
for i in *; do
|
2008-03-17 12:59:12 +01:00
|
|
|
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 in in *; do
|
2008-03-13 19:02:48 +01:00
|
|
|
if [[ -d $i ]]; then
|
2008-03-17 12:59:12 +01:00
|
|
|
echo '#!'"$SHELL" > $out/bin/ehc-$i
|
|
|
|
echo "exec \"$out/bin-ehc/ehc-$i\" -P $out/lib-ehc/$i/ehcbase" '"$@"' >> $out/bin/ehc-$i
|
|
|
|
chmod 751 $out/bin/ehc-$i
|
2008-03-13 19:02:48 +01:00
|
|
|
fi;
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Essential Haskell Compiler";
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit coreutils;
|
|
|
|
})
|