2012-04-09 10:17:17 +00:00
|
|
|
{ stdenv, coreutils, glibc, fetchgit, m4, libtool, ghc, uulib
|
2011-09-05 19:24:07 +00:00
|
|
|
, uuagc, mtl, network, binary, llvm, fgl, syb
|
|
|
|
}:
|
2008-03-13 18:02:48 +00:00
|
|
|
|
2012-06-11 18:58:28 +00:00
|
|
|
# this check won't be needed anymore after ghc-wrapper is fixed
|
|
|
|
# to show ghc-builtin packages in "ghc-pkg list" output.
|
2013-10-26 16:33:09 +00:00
|
|
|
let binaryIsBuiltIn = builtins.compareVersions "7.2.1" ghc.version != 1;
|
2012-06-11 18:58:28 +00:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2012-05-09 10:01:41 +00:00
|
|
|
name = "uhc-svn-git20120502";
|
2008-03-13 18:02:48 +00:00
|
|
|
|
2012-04-09 10:17:17 +00:00
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/UU-ComputerScience/uhc.git";
|
2012-05-09 10:01:41 +00:00
|
|
|
rev = "ab26d787657bb729d8a4f92ef5d067d9990f6ce3";
|
|
|
|
sha256 = "66c5b6d95dc80a652f6e17476a1b18fbef4b4ff6199a92d033f0055526ec97ff";
|
2008-03-13 18:02:48 +00:00
|
|
|
};
|
|
|
|
|
2012-04-09 10:17:17 +00:00
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/EHC";
|
|
|
|
|
2011-09-05 19:24:07 +00:00
|
|
|
propagatedBuildInputs = [mtl network binary fgl syb];
|
2010-04-29 17:35:09 +00:00
|
|
|
buildInputs = [coreutils m4 ghc libtool uulib uuagc];
|
2008-03-13 18:02:48 +00:00
|
|
|
|
2011-12-11 19:54:40 +00:00
|
|
|
# Can we rename this flag to "--with-cpp-uhc-options"?
|
2011-09-05 19:24:07 +00:00
|
|
|
configureFlags = "--with-cpp-ehc-options=-I${glibc}/include";
|
2010-04-29 17:35:09 +00:00
|
|
|
|
2011-12-11 19:54:40 +00:00
|
|
|
# UHC builds packages during compilation; these are by default
|
2010-04-29 17:35:09 +00: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 18:02:48 +00:00
|
|
|
preConfigure = ''
|
2011-12-11 19:54:40 +00:00
|
|
|
p=`pwd`/uhc-local-packages
|
2010-04-29 17:35:09 +00: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 18:02:48 +00:00
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/dist.mk
|
2012-03-22 22:37:08 +00:00
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in
|
2012-06-11 18:58:28 +00:00
|
|
|
'' + stdenv.lib.optionalString binaryIsBuiltIn ''
|
|
|
|
sed -i "s|ghcLibBinary=no|ghcLibBinaryExists=yes|" configure
|
2008-03-13 18:02:48 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2011-12-11 19:54:40 +00:00
|
|
|
homepage = "http://www.cs.uu.nl/wiki/UHC";
|
|
|
|
description = "Utrecht Haskell Compiler";
|
2011-09-05 19:24:07 +00:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [
|
|
|
|
stdenv.lib.maintainers.andres
|
|
|
|
];
|
2008-03-13 18:02:48 +00:00
|
|
|
};
|
2011-09-05 19:24:07 +00:00
|
|
|
}
|