diff options
author | Peter Simons <simons@cryp.to> | 2015-03-10 11:22:15 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-03-10 11:22:15 +0100 |
commit | 8196130a1d922f24e77026d88859b824b15e40ba (patch) | |
tree | 851f5d608c412588ce75efd54e86a75e08aafdd9 /pkgs/development/compilers | |
parent | 3eb0dd5a4ce55827b40a9a074b2183c7aaff143d (diff) | |
parent | 2eacaa856b71035607041587641037b58914546a (diff) | |
download | nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar.gz nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar.bz2 nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar.lz nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar.xz nixlib-8196130a1d922f24e77026d88859b824b15e40ba.tar.zst nixlib-8196130a1d922f24e77026d88859b824b15e40ba.zip |
Merge pull request #6711 from phile314/dev
haskell: Add uhc compiler
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/uhc/default.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/compilers/uhc/default.nix b/pkgs/development/compilers/uhc/default.nix new file mode 100644 index 000000000000..ce3f805bec32 --- /dev/null +++ b/pkgs/development/compilers/uhc/default.nix @@ -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; + }; +} |