git.iko.soy/typeable/nixpkgs
on master help sign in
package GHC-8.0.1-rc1
commit552207f5ef690b8424d414914a983076cacdbaa2 authorJude Taylor <me@jude.bio> dateWed 13 Jan 2016, 12:03 (11 years ago) parentc1df52d
3 files changed+100
pkgs/development/compilers/ghc/8.0.1.nix+61 pkgs/development/haskell-modules/configuration-ghc-8.0.x.nix+32 pkgs/top-level/haskell-packages.nix+7
pkgs/development/compilers/ghc/8.0.1.nixnew file+61
@@ -0,0 +1,61 @@
1+{ stdenv, fetchurl, fetchpatch, ghc, perl, gmp, ncurses, libiconv, binutils, coreutils
2+, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour
3+}:
4+
5+stdenv.mkDerivation rec {
6+ version = "8.0.0.20160111";
7+ name = "ghc-${version}";
8+
9+ src = fetchurl {
10+ url = "https://downloads.haskell.org/~ghc/8.0.1-rc1/${name}-src.tar.xz";
11+ sha256 = "0y4nha46mw01ysw90kh8szcbsfdc37rqjm7r5fyk6flqwr8b6pvr";
12+ };
13+
14+ patches = [
15+ ./dont-pass-linker-flags-via-response-files.patch # https://github.com/NixOS/nixpkgs/issues/10752
16+ ];
17+
18+ buildInputs = [ ghc perl libxml2 libxslt docbook_xsl docbook_xml_dtd_45 docbook_xml_dtd_42 hscolour ];
19+
20+ enableParallelBuilding = true;
21+
22+ preConfigure = ''
23+ sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
24+ '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
25+ export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
26+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
27+ export NIX_LDFLAGS+=" -no_dtrace_dof"
28+ '';
29+
30+ configureFlags = [
31+ "--with-gcc=${stdenv.cc}/bin/cc"
32+ "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
33+ "--with-curses-includes=${ncurses}/include" "--with-curses-libraries=${ncurses}/lib"
34+ ] ++ stdenv.lib.optional stdenv.isDarwin [
35+ "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
36+ ];
37+
38+ # required, because otherwise all symbols from HSffi.o are stripped, and
39+ # that in turn causes GHCi to abort
40+ stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
41+
42+ postInstall = ''
43+ # Install the bash completion file.
44+ install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/ghc
45+
46+ # Patch scripts to include "readelf" and "cat" in $PATH.
47+ for i in "$out/bin/"*; do
48+ test ! -h $i || continue
49+ egrep --quiet '^#!' <(head -n 1 $i) || continue
50+ sed -i -e '2i export PATH="$PATH:${binutils}/bin:${coreutils}/bin"' $i
51+ done
52+ '';
53+
54+ meta = {
55+ homepage = "http://haskell.org/ghc";
56+ description = "The Glasgow Haskell Compiler";
57+ maintainers = with stdenv.lib.maintainers; [ marcweber andres simons ];
58+ inherit (ghc.meta) license platforms;
59+ };
60+
61+}
pkgs/development/haskell-modules/configuration-ghc-8.0.x.nixnew file+32
@@ -0,0 +1,32 @@
1+{ pkgs }:
2+
3+with import ./lib.nix { inherit pkgs; };
4+
5+self: super: {
6+ # Disable GHC 8.0.x core libraries.
7+ array = null;
8+ base = null;
9+ binary = null;
10+ bytestring = null;
11+ Cabal = null;
12+ containers = null;
13+ deepseq = null;
14+ directory = null;
15+ filepath = null;
16+ ghc-boot = null;
17+ ghc-prim = null;
18+ ghci = null;
19+ haskeline = null;
20+ hoopl = null;
21+ hpc = null;
22+ integer-gmp = null;
23+ pretty = null;
24+ process = null;
25+ rts = null;
26+ template-haskell = null;
27+ terminfo = null;
28+ time = null;
29+ transformers = null;
30+ unix = null;
31+ xhtml = null;
32+}
pkgs/top-level/haskell-packages.nix+7
@@ -46,6 +46,9 @@ rec {
4646 ghcNokinds = callPackage ../development/compilers/ghc/nokinds.nix ({ inherit (packages.ghc784) ghc alex happy; } // stdenv.lib.optionalAttrs stdenv.isDarwin {
4747 libiconv = pkgs.darwin.libiconv;
4848 });
49+ ghc801 = callPackage ../development/compilers/ghc/8.0.1.nix {
50+ ghc = compiler.ghc7103; inherit (packages.ghc7103) hscolour;
51+ };
4952
5053 ghcjs = packages.ghc7102.callPackage ../development/compilers/ghcjs {
5154 ghc = compiler.ghc7102;
@@ -102,6 +105,10 @@ rec {
102105 ghc = compiler.ghc7103;
103106 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
104107 };
108+ ghc801 = callPackage ../development/haskell-modules {
109+ ghc = compiler.ghc801;
110+ compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.0.x.nix { };
111+ };
105112 ghcHEAD = callPackage ../development/haskell-modules {
106113 ghc = compiler.ghcHEAD;
107114 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };