Merge pull request #6711 from phile314/dev

haskell: Add uhc compiler
This commit is contained in:
Peter Simons 2015-03-10 11:22:15 +01:00
commit 8196130a1d
3 changed files with 53 additions and 0 deletions

View File

@ -139,6 +139,7 @@
page = "Carles Pagès <page@cubata.homelinux.net>";
paholg = "Paho Lurie-Gregg <paho@paholg.com>";
pashev = "Igor Pashev <pashev.igor@gmail.com>";
phausmann = "Philipp Hausmann <nix@314.ch>";
phreedom = "Evgeny Egorochkin <phreedom@yandex.ru>";
pierron = "Nicolas B. Pierron <nixos@nbp.name>";
piotr = "Piotr Pietraszkiewicz <ppietrasa@gmail.com>";

View File

@ -0,0 +1,46 @@
{ stdenv, coreutils, fetchgit, m4, libtool, clang, ghcWithPackages,
shuffle,
hashable, mtl, network, uhc-util, uulib
}:
let wrappedGhc = ghcWithPackages ( self: [hashable mtl network uhc-util uulib] );
in stdenv.mkDerivation rec {
version = "1.1.8.7";
name = "uhc-${version}";
src = fetchgit {
url = "https://github.com/UU-ComputerScience/uhc.git";
rev = "0dec07e9cb60e78bbca63fc101f8fec6e249269f";
sha256 = "0isz3qz23ihbn0rg54x8ddzwpsqlmmpkvaa66b7srfly7nciv8gl";
};
postUnpack = "sourceRoot=\${sourceRoot}/EHC";
buildInputs = [ m4 wrappedGhc clang libtool shuffle ];
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 = ''
p=`pwd`/uhc-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
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";
maintainers = [ maintainers.phausmann ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -3516,6 +3516,12 @@ let
regexCompat HsSyck random;
};
uhc = callPackage ../development/compilers/uhc/default.nix ({
stdenv = clangStdenv;
ghcWithPackages = haskellngPackages.ghcWithPackages;
inherit (haskellngPackages) shuffle hashable mtl network uhc-util uulib;
});
gcc-arm-embedded-4_7 = callPackage_i686 ../development/compilers/gcc-arm-embedded {
version = "4.7-2013q3-20130916";
releaseType = "update";