summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc/7.0.4.nix
diff options
context:
space:
mode:
authorAndres Löh <mail@andres-loeh.de>2011-06-18 12:31:16 +0000
committerAndres Löh <mail@andres-loeh.de>2011-06-18 12:31:16 +0000
commita1cd10cfe2a74e3700dd37485c123ad070141f4f (patch)
tree0eb1b2176be38fa869671082e0b3ad841a3788d3 /pkgs/development/compilers/ghc/7.0.4.nix
parent0c0f4d5eacd43e9ff62b49a27ca3e1ca5d96b18c (diff)
downloadnixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar.gz
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar.bz2
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar.lz
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar.xz
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.tar.zst
nixlib-a1cd10cfe2a74e3700dd37485c123ad070141f4f.zip
Adding ghc-7.0.4.
svn path=/nixpkgs/trunk/; revision=27492
Diffstat (limited to 'pkgs/development/compilers/ghc/7.0.4.nix')
-rw-r--r--pkgs/development/compilers/ghc/7.0.4.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/7.0.4.nix b/pkgs/development/compilers/ghc/7.0.4.nix
new file mode 100644
index 000000000000..3892efd05468
--- /dev/null
+++ b/pkgs/development/compilers/ghc/7.0.4.nix
@@ -0,0 +1,43 @@
+{stdenv, fetchurl, ghc, perl, gmp, ncurses, darwinInstallNameToolUtility}:
+
+stdenv.mkDerivation rec {
+  version = "7.0.4";
+  name = "ghc-${version}";
+
+  src = fetchurl {
+    url = "http://haskell.org/ghc/dist/${version}/${name}-src.tar.bz2";
+    sha256 = "1a9b78d9d66c9c21de6c0932e36bb87406a4856f1611bf83bd44539bdc6ed0ed";
+  };
+
+  buildInputs = [ghc perl gmp ncurses] ++
+    (if stdenv.isDarwin then [darwinInstallNameToolUtility] else []);
+
+  buildMK = ''
+    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
+    libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
+  '';
+
+  preConfigure = ''
+    echo "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '';
+
+  configureFlags=[
+    "--with-gcc=${stdenv.gcc}/bin/gcc"
+  ];
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags=["-S" "--keep-file-symbols"];
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = [
+      stdenv.lib.maintainers.marcweber
+      stdenv.lib.maintainers.andres
+    ];
+    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+  };
+
+}