2016-01-29 17:46:56 +01:00
|
|
|
# Note: The Haskell package set used for building UHC is
|
|
|
|
# determined in the file top-level/haskell-packages.nix.
|
|
|
|
# We are using Stackage LTS to avoid constant breakage.
|
|
|
|
# Bump the Stackage LTS release to the last release if possible
|
|
|
|
# when a new UHC version is released.
|
2015-04-23 15:21:15 +02:00
|
|
|
{ stdenv, coreutils, fetchgit, m4, libtool, clang, ghcWithPackages }:
|
2015-03-06 23:43:38 +01:00
|
|
|
|
2015-10-15 13:12:40 +02:00
|
|
|
let wrappedGhc = ghcWithPackages (hpkgs: with hpkgs; [fgl vector syb uulib network binary hashable uhc-util mtl transformers directory containers array process filepath shuffle uuagc] );
|
2015-03-06 23:43:38 +01:00
|
|
|
in stdenv.mkDerivation rec {
|
2015-06-15 10:47:53 +02:00
|
|
|
# Important:
|
|
|
|
# The commits "Fixate/tag v..." are the released versions.
|
|
|
|
# Ignore the "bumped version to ...." commits, they do not
|
|
|
|
# correspond to releases.
|
2015-11-08 12:24:19 +01:00
|
|
|
version = "1.1.9.2";
|
2015-03-06 23:43:38 +01:00
|
|
|
name = "uhc-${version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/UU-ComputerScience/uhc.git";
|
2015-11-08 12:24:19 +01:00
|
|
|
rev = "292d259113b98c32154a5be336875751caa5edbc";
|
|
|
|
sha256 = "1f462xq9ilkp9mnxm8hxhh1cdwps5d0hxysyibxryk32l7hh53cz";
|
2015-03-06 23:43:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = "sourceRoot=\${sourceRoot}/EHC";
|
|
|
|
|
2015-04-23 15:21:15 +02:00
|
|
|
buildInputs = [ m4 wrappedGhc clang libtool ];
|
2015-03-06 23:43:38 +01:00
|
|
|
|
|
|
|
configureFlags = [ "--with-gcc=${clang}/bin/clang" ];
|
|
|
|
|
|
|
|
# UHC 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 = ''
|
2015-04-30 11:45:05 +02:00
|
|
|
p=`pwd`/uhc-local-packages/
|
|
|
|
ghc-pkg init $p
|
2015-03-06 23:43:38 +01:00
|
|
|
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
|
|
|
|
sed -i "s|/bin/date|${coreutils}/bin/date|g" mk/config.mk.in
|
|
|
|
sed -i "s|--make|--make -package-db=$p|g" src/ehc/files2.mk
|
|
|
|
sed -i "s|--make|--make -package-db=$p|g" src/gen/files.mk
|
|
|
|
'';
|
|
|
|
|
|
|
|
inherit clang;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "http://www.cs.uu.nl/wiki/UHC";
|
|
|
|
description = "Utrecht Haskell Compiler";
|
2015-12-27 19:12:37 +01:00
|
|
|
maintainers = [ maintainers.phile314 ];
|
2015-03-30 18:47:38 +02:00
|
|
|
|
|
|
|
# UHC i686 support is broken, see
|
|
|
|
# https://github.com/UU-ComputerScience/uhc/issues/52
|
|
|
|
#
|
|
|
|
# Darwin build is broken as well at the moment.
|
|
|
|
# On Darwin, the GNU libtool is used, which does not
|
|
|
|
# support the -static flag and thus breaks the build.
|
|
|
|
platforms = ["x86_64-linux"];
|
2016-01-29 17:46:56 +01:00
|
|
|
# Hydra currently doesn't build the Stackage LTS package set,
|
|
|
|
# and we don't want to build all our haskell dependencies
|
|
|
|
# from scratch just to build UHC.
|
|
|
|
hydraPlatforms = stdenv.lib.platforms.none;
|
2016-01-18 16:11:52 +01:00
|
|
|
|
2015-03-06 23:43:38 +01:00
|
|
|
};
|
|
|
|
}
|