about summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2004-02-12 13:18:24 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2004-02-12 13:18:24 +0000
commit191a465665ae1bbed18aed0431a58ad53876d3e2 (patch)
tree6cab95b23e53ceb3ad8f04d1c50c48da0716e6e7 /pkgs/development/compilers/ghc
parent73049cea22e00786e949eb3e4c95659715935fa9 (diff)
downloadnixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar.gz
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar.bz2
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar.lz
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar.xz
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.tar.zst
nixlib-191a465665ae1bbed18aed0431a58ad53876d3e2.zip
* Added GHC and Helium. Note that GHC is built using a pre-built GHC
  for Linux/x86, which is not pure and doesn't work on other
  platforms!

svn path=/nixpkgs/trunk/; revision=776
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/boot.nix16
-rwxr-xr-xpkgs/development/compilers/ghc/boot.sh11
-rwxr-xr-xpkgs/development/compilers/ghc/builder.sh11
-rw-r--r--pkgs/development/compilers/ghc/default.nix14
4 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/development/compilers/ghc/boot.nix b/pkgs/development/compilers/ghc/boot.nix
new file mode 100644
index 000000000000..a11f93a33fa0
--- /dev/null
+++ b/pkgs/development/compilers/ghc/boot.nix
@@ -0,0 +1,16 @@
+{stdenv, fetchurl, perl}:
+
+assert perl != null;
+
+assert stdenv.system == "i686-linux";
+
+derivation {
+  name = "ghc-6.2";
+  system = stdenv.system;
+  builder = ./boot.sh;
+  src = fetchurl {
+    url = http://www.haskell.org/ghc/dist/6.2/ghc-6.2-i386-unknown-linux.tar.bz2;
+    md5 = "5b2f19ca00fd7494002047d7fb4dce3e";
+  };
+  inherit stdenv perl;
+}
diff --git a/pkgs/development/compilers/ghc/boot.sh b/pkgs/development/compilers/ghc/boot.sh
new file mode 100755
index 000000000000..d08c31c9b310
--- /dev/null
+++ b/pkgs/development/compilers/ghc/boot.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+buildinputs="$perl"
+. $stdenv/setup || exit 1
+
+tar xvfj $src || exit 1
+cd ghc-* || exit 1
+./configure --prefix=$out || exit 1
+make || exit 1
+make install || exit 1
+strip -S $out/lib/*/*.a || exit 1
diff --git a/pkgs/development/compilers/ghc/builder.sh b/pkgs/development/compilers/ghc/builder.sh
new file mode 100755
index 000000000000..9a2a235158f5
--- /dev/null
+++ b/pkgs/development/compilers/ghc/builder.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+buildinputs="$perl $ghc $m4"
+. $stdenv/setup || exit 1
+
+tar xvfj $src || exit 1
+cd ghc-* || exit 1
+./configure --prefix=$out || exit 1
+make || exit 1
+make install || exit 1
+strip -S $out/lib/*/*.a || exit 1
diff --git a/pkgs/development/compilers/ghc/default.nix b/pkgs/development/compilers/ghc/default.nix
new file mode 100644
index 000000000000..5872c81eb8bc
--- /dev/null
+++ b/pkgs/development/compilers/ghc/default.nix
@@ -0,0 +1,14 @@
+{stdenv, fetchurl, perl, ghc, m4}:
+
+assert perl != null && ghc != null && m4 != null;
+
+derivation {
+  name = "ghc-6.2";
+  system = stdenv.system;
+  builder = ./builder.sh;
+  src = fetchurl {
+    url = http://www.haskell.org/ghc/dist/6.2/ghc-6.2-src.tar.bz2;
+    md5 = "cc495e263f4384e1d6b38e851bf6eca0";
+  };
+  inherit stdenv perl ghc m4;
+}