2011-09-05 21:24:07 +02:00
|
|
|
{ stdenv, coreutils, glibc, fetchsvn, m4, libtool, ghc, uulib
|
|
|
|
, uuagc, mtl, network, binary, llvm, fgl, syb
|
|
|
|
}:
|
2008-03-13 19:02:48 +01:00
|
|
|
|
2011-09-05 21:24:07 +02:00
|
|
|
let
|
2012-03-22 23:37:08 +01:00
|
|
|
revision = "2495";
|
2011-09-05 21:24:07 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2011-12-11 20:54:40 +01:00
|
|
|
name = "uhc-svn-${revision}";
|
2008-03-13 19:02:48 +01:00
|
|
|
|
|
|
|
src = fetchsvn {
|
2011-12-11 20:54:40 +01:00
|
|
|
url = "https://subversion.cs.uu.nl/repos/project.UHC.pub/trunk/EHC";
|
2011-09-05 21:24:07 +02:00
|
|
|
rev = revision;
|
2012-03-22 23:37:08 +01:00
|
|
|
sha256 = "0402cb05629454e29bdca02051406bc9e515d2525a785c85079469b674378fca";
|
2008-03-13 19:02:48 +01:00
|
|
|
};
|
|
|
|
|
2011-09-05 21:24:07 +02:00
|
|
|
propagatedBuildInputs = [mtl network binary fgl syb];
|
2010-04-29 19:35:09 +02:00
|
|
|
buildInputs = [coreutils m4 ghc libtool uulib uuagc];
|
2008-03-13 19:02:48 +01:00
|
|
|
|
2011-12-11 20:54:40 +01:00
|
|
|
# Can we rename this flag to "--with-cpp-uhc-options"?
|
2011-09-05 21:24:07 +02:00
|
|
|
configureFlags = "--with-cpp-ehc-options=-I${glibc}/include";
|
2010-04-29 19:35:09 +02:00
|
|
|
|
2011-12-11 20:54:40 +01:00
|
|
|
# UHC builds packages during compilation; these are by default
|
2010-04-29 19:35:09 +02:00
|
|
|
# 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.
|
2008-03-13 19:02:48 +01:00
|
|
|
preConfigure = ''
|
2011-12-11 20:54:40 +01:00
|
|
|
p=`pwd`/uhc-local-packages
|
2010-04-29 19:35:09 +02:00
|
|
|
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
|
2008-03-13 19:02:48 +01:00
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
|
2012-03-22 23:37:08 +01:00
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in
|
2008-03-13 19:02:48 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2011-12-11 20:54:40 +01:00
|
|
|
homepage = "http://www.cs.uu.nl/wiki/UHC";
|
|
|
|
description = "Utrecht Haskell Compiler";
|
2011-09-05 21:24:07 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.andres
|
|
|
|
stdenv.lib.maintainers.simons
|
|
|
|
];
|
2008-03-13 19:02:48 +01:00
|
|
|
};
|
2011-09-05 21:24:07 +02:00
|
|
|
}
|