git.iko.soy/typeable/nixpkgs
on master help sign in
ghc: add haskell.compiler.ghcNokinds, for Richard Eisenberg's 'nokinds' branch
commit5fee7af3ba3b20b0561bd25a8ccb2c4c1d8d842b authorKosyrev Serge <_deepfire@feelingofgreen.ru> dateMon 6 Jul 2015, 11:02 (11 years ago) parent4b836fb
4 files changed+186
doc/haskell-users-guide.xml+1 pkgs/development/compilers/ghc/nokinds.nix+74 pkgs/development/haskell-modules/configuration-ghc-nokinds.nix+104 pkgs/top-level/haskell-packages.nix+7
doc/haskell-users-guide.xml+1
@@ -136,6 +136,7 @@ haskell.compiler.ghc763 ghc-7.6.3
136136haskell.compiler.ghc784 ghc-7.8.4
137137haskell.compiler.ghc7101 ghc-7.10.1
138138haskell.compiler.ghcHEAD ghc-7.11.20150402
139+haskell.compiler.ghcNokinds ghc-nokinds-7.11.20150704
139140haskell.compiler.ghcjs ghcjs-0.1.0
140141haskell.compiler.jhc jhc-0.8.2
141142haskell.compiler.uhc uhc-1.1.9.0
pkgs/development/compilers/ghc/nokinds.nixnew file+74
@@ -0,0 +1,74 @@
1+{ stdenv, fetchgit, ghc, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }:
2+
3+let
4+
5+ buildMK = ''
6+ libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp}/lib"
7+ libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp}/include"
8+ libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses}/include"
9+ libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses}/lib"
10+ DYNAMIC_BY_DEFAULT = NO
11+ SRC_HC_OPTS = -H64m -O -fasm
12+ GhcLibHcOpts = -O -dcore-lint
13+ GhcStage1HcOpts = -Rghc-timing -O -fasm
14+ GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG
15+ SplitObjs = NO
16+ HADDOCK_DOCS = NO
17+ BUILD_DOCBOOK_HTML = NO
18+ BUILD_DOCBOOK_PS = NO
19+ BUILD_DOCBOOK_PDF = NO
20+ LAX_DEPENDENCIES = YES
21+ ${stdenv.lib.optionalString stdenv.isDarwin ''
22+ libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include"
23+ libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib"
24+ ''}
25+ '';
26+
27+in
28+
29+stdenv.mkDerivation rec {
30+ version = "7.11.20150703";
31+ name = "ghc-nokinds-${version}";
32+ rev = "887170ac254aaacc2d5e29f2565ac61522fd8f61";
33+
34+ src = fetchgit {
35+ url = "https://github.com/goldfirere/ghc.git";
36+ inherit rev;
37+ sha256 = "010x9ckig76sz97s2ss1j1sf70czqx1cn39nj4xbh49m8n2zvsqf";
38+ };
39+
40+ postUnpack = ''
41+ pushd ghc-${builtins.substring 0 7 rev}
42+ patchShebangs .
43+ ./boot
44+ popd
45+ '';
46+
47+ buildInputs = [ ghc perl autoconf automake happy alex ];
48+
49+ preConfigure = ''
50+ echo >mk/build.mk "${buildMK}"
51+ sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
52+ '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
53+ export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}"
54+ '';
55+
56+ configureFlags = [
57+ "--with-gcc=${stdenv.cc}/bin/cc"
58+ "--with-gmp-includes=${gmp}/include" "--with-gmp-libraries=${gmp}/lib"
59+ ];
60+
61+ enableParallelBuilding = true;
62+
63+ # required, because otherwise all symbols from HSffi.o are stripped, and
64+ # that in turn causes GHCi to abort
65+ stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols";
66+
67+ meta = {
68+ homepage = "http://haskell.org/ghc";
69+ description = "The dependently-typed 'nokinds' branch of the Glasgow Haskell Compiler by Richard Eisenberg";
70+ maintainers = with stdenv.lib.maintainers; [ ];
71+ inherit (ghc.meta) license platforms;
72+ };
73+
74+}
pkgs/development/haskell-modules/configuration-ghc-nokinds.nixnew file+104
@@ -0,0 +1,104 @@
1+{ pkgs }:
2+
3+with import ./lib.nix { inherit pkgs; };
4+
5+self: super: {
6+
7+ # Use the latest LLVM.
8+ inherit (pkgs) llvmPackages;
9+
10+ # Disable GHC 7.11.x core libraries.
11+ array = null;
12+ base = null;
13+ binary = null;
14+ bin-package-db = null;
15+ bytestring = null;
16+ Cabal = null;
17+ containers = null;
18+ deepseq = null;
19+ directory = null;
20+ filepath = null;
21+ ghc-prim = null;
22+ haskeline = null;
23+ hoopl = null;
24+ hpc = null;
25+ integer-gmp = null;
26+ pretty = null;
27+ process = null;
28+ rts = null;
29+ template-haskell = null;
30+ terminfo = null;
31+ time = null;
32+ transformers = null;
33+ unix = null;
34+ xhtml = null;
35+
36+ # Don't use jailbreak built with Cabal 1.22.x because of https://github.com/peti/jailbreak-cabal/issues/9.
37+ jailbreak-cabal = pkgs.haskell.packages.ghc784.jailbreak-cabal;
38+
39+ # GHC 7.10.x's Haddock binary cannot generate hoogle files.
40+ # https://ghc.haskell.org/trac/ghc/ticket/9921
41+ mkDerivation = drv: super.mkDerivation (drv // { doHoogle = false; doHaddock = false; });
42+
43+ # haddock: No input file(s).
44+ nats = dontHaddock super.nats;
45+ bytestring-builder = dontHaddock super.bytestring-builder;
46+
47+ alex = dontCheck super.alex;
48+
49+ # We have time 1.5
50+ aeson = disableCabalFlag super.aeson "old-locale";
51+
52+ # Show works differently for record syntax now, breaking haskell-src-exts' parser tests
53+ # https://github.com/haskell-suite/haskell-src-exts/issues/224
54+ haskell-src-exts = dontCheck super.haskell-src-exts;
55+
56+ mono-traversable = appendPatch super.mono-traversable (pkgs.fetchpatch {
57+ url = "https://github.com/snoyberg/mono-traversable/pull/77.patch";
58+ sha256 = "1qrvrh3cqfkymi5yb9y9z88rq4n7ag0ac2k00mcnqh4dz1vh4fg1";
59+ });
60+ yesod-auth = appendPatch super.yesod-auth (pkgs.fetchpatch {
61+ url = "https://github.com/yesodweb/yesod/pull/1006.patch";
62+ sha256 = "0l6wjj8cfz6jy6j92kywsccafyffhlm5240q82bzirb278adqvar";
63+ stripLen = 1;
64+ });
65+
66+ # Setup: At least the following dependencies are missing: base <4.8
67+ hspec-expectations = overrideCabal super.hspec-expectations (drv: {
68+ patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
69+ });
70+ utf8-string = overrideCabal super.utf8-string (drv: {
71+ patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
72+ });
73+
74+ # bos/attoparsec#92
75+ attoparsec = dontCheck super.attoparsec;
76+
77+ # test suite hangs silently for at least 10 minutes
78+ split = dontCheck super.split;
79+
80+ # Test suite fails with some (seemingly harmless) error.
81+ # https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24
82+ syb = dontCheck super.syb;
83+
84+ # Test suite has stricter version bounds
85+ retry = dontCheck super.retry;
86+
87+ # Test suite fails with time >= 1.5
88+ http-date = dontCheck super.http-date;
89+
90+ # Version 1.19.5 fails its test suite.
91+ happy = dontCheck super.happy;
92+
93+ # Workaround for a workaround, see comment for "ghcjs" flag.
94+ jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs";
95+ in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3
96+ self.webkitgtk3-javascriptcore ];
97+
98+ # The compat library is empty in the presence of mtl 2.2.x.
99+ mtl-compat = dontHaddock super.mtl-compat;
100+
101+ # Won't work with LLVM 3.5.
102+ llvm-general = markBrokenVersion "3.4.5.3" super.llvm-general;
103+
104+}
pkgs/top-level/haskell-packages.nix+7
@@ -40,6 +40,9 @@ rec {
4040 ghcHEAD = callPackage ../development/compilers/ghc/head.nix ({ inherit (packages.ghc784) ghc alex happy; } // stdenv.lib.optionalAttrs stdenv.isDarwin {
4141 libiconv = pkgs.darwin.libiconv;
4242 });
43+ ghcNokinds = callPackage ../development/compilers/ghc/nokinds.nix ({ inherit (packages.ghc784) ghc alex happy; } // stdenv.lib.optionalAttrs stdenv.isDarwin {
44+ libiconv = pkgs.darwin.libiconv;
45+ });
4346
4447 ghcjs = packages.ghc7101.callPackage ../development/compilers/ghcjs {
4548 ghc = compiler.ghc7101;
@@ -95,6 +98,10 @@ rec {
9598 ghc = compiler.ghcHEAD;
9699 packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { };
97100 };
101+ ghcNokinds = callPackage ../development/haskell-modules {
102+ ghc = compiler.ghcNokinds;
103+ packageSetConfig = callPackage ../development/haskell-modules/configuration-ghc-nokinds.nix { };
104+ };
98105 ghcjs = callPackage ../development/haskell-modules {
99106 ghc = compiler.ghcjs;
100107 packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { };