Merge pull request #21393 from mpickering/master

Small improvements to development GHC derivations

authored by Peter Simons and committed by GitHub 494d695b 85ff5a25

+11 -204
+11 -10
pkgs/development/compilers/ghc/head.nix
··· 1 { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils 2 - , autoconf, automake, happy, alex, crossSystem, selfPkgs, cross ? null 3 }: 4 5 let 6 inherit (bootPkgs) ghc; 7 8 - commonBuildInputs = [ ghc perl autoconf automake happy alex ]; 9 10 - version = "8.1.20161115"; 11 12 commonPreConfigure = '' 13 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure ··· 19 in stdenv.mkDerivation (rec { 20 inherit version; 21 name = "ghc-${version}"; 22 - rev = "017d11e0a36866b05ace32ece1af11adf652a619"; 23 24 src = fetchgit { 25 url = "git://git.haskell.org/ghc.git"; 26 inherit rev; 27 - sha256 = "1ryggmz961qd0fl50rkjjvi6g9azwla2vx9310a9nzjaj5x6ib4y"; 28 }; 29 30 - postPatch = '' 31 echo ${version} >VERSION 32 echo ${rev} >GIT_COMMIT_ID 33 - patchShebangs . 34 ./boot 35 - ''; 36 37 buildInputs = commonBuildInputs; 38 39 enableParallelBuilding = true; 40 - 41 - preConfigure = commonPreConfigure; 42 43 configureFlags = [ 44 "CC=${stdenv.cc}/bin/cc" ··· 51 # required, because otherwise all symbols from HSffi.o are stripped, and 52 # that in turn causes GHCi to abort 53 stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols"; 54 55 postInstall = '' 56 paxmark m $out/lib/${name}/bin/{ghc,haddock}
··· 1 { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils 2 + , autoconf, automake, happy, alex, python3, crossSystem, selfPkgs, cross ? null 3 }: 4 5 let 6 inherit (bootPkgs) ghc; 7 8 + commonBuildInputs = [ ghc perl autoconf automake happy alex python3 ]; 9 10 + version = "8.1.20161224"; 11 12 commonPreConfigure = '' 13 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure ··· 19 in stdenv.mkDerivation (rec { 20 inherit version; 21 name = "ghc-${version}"; 22 + rev = "2689a1692636521777f007861a484e7064b2d696"; 23 24 src = fetchgit { 25 url = "git://git.haskell.org/ghc.git"; 26 inherit rev; 27 + sha256 = "0rk6xy7kgxx849nprq1ji459p88nyy93236g841m5p6mdh7mmrcr"; 28 }; 29 30 + postPatch = "patchShebangs ."; 31 + 32 + preConfigure = '' 33 echo ${version} >VERSION 34 echo ${rev} >GIT_COMMIT_ID 35 ./boot 36 + '' + commonPreConfigure ; 37 38 buildInputs = commonBuildInputs; 39 40 enableParallelBuilding = true; 41 42 configureFlags = [ 43 "CC=${stdenv.cc}/bin/cc" ··· 50 # required, because otherwise all symbols from HSffi.o are stripped, and 51 # that in turn causes GHCi to abort 52 stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols"; 53 + 54 + checkTarget = "test"; 55 56 postInstall = '' 57 paxmark m $out/lib/${name}/bin/{ghc,haddock}
-83
pkgs/development/compilers/ghc/nokinds.nix
··· 1 - { stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, autoconf, automake, happy, alex }: 2 - 3 - let 4 - inherit (bootPkgs) ghc; 5 - 6 - buildMK = '' 7 - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" 8 - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" 9 - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" 10 - libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" 11 - DYNAMIC_BY_DEFAULT = NO 12 - SRC_HC_OPTS = -H64m -O -fasm 13 - GhcLibHcOpts = -O -dcore-lint 14 - GhcStage1HcOpts = -Rghc-timing -O -fasm 15 - GhcStage2HcOpts = -Rghc-timing -O0 -DDEBUG 16 - SplitObjs = NO 17 - HADDOCK_DOCS = NO 18 - BUILD_DOCBOOK_HTML = NO 19 - BUILD_DOCBOOK_PS = NO 20 - BUILD_DOCBOOK_PDF = NO 21 - LAX_DEPENDENCIES = YES 22 - ${stdenv.lib.optionalString stdenv.isDarwin '' 23 - libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" 24 - libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" 25 - ''} 26 - ''; 27 - 28 - in 29 - 30 - stdenv.mkDerivation rec { 31 - version = "7.11.20150826"; 32 - name = "ghc-${version}"; # We cannot add a "nokinds" tag here; see git comment for details. 33 - rev = "5f7f64b7fc879b5ecfd6987ec5565bd90f7c0179"; 34 - 35 - src = fetchgit { 36 - url = "https://github.com/goldfirere/ghc.git"; 37 - inherit rev; 38 - sha256 = "183l4v6aw52r3ydwl8bxg1lh3cwfakb35rpy6mjg23dqmqsynmcn"; 39 - }; 40 - 41 - patches = [ ./relocation.patch ]; 42 - 43 - postUnpack = '' 44 - pushd ghc-${builtins.substring 0 7 rev} 45 - echo ${version} >VERSION 46 - echo ${rev} >GIT_COMMIT_ID 47 - patchShebangs . 48 - ./boot 49 - popd 50 - ''; 51 - 52 - buildInputs = [ ghc perl autoconf automake happy alex ]; 53 - 54 - preConfigure = '' 55 - echo >mk/build.mk "${buildMK}" 56 - sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure 57 - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' 58 - export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" 59 - ''; 60 - 61 - configureFlags = [ 62 - "--with-gcc=${stdenv.cc}/bin/cc" 63 - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" 64 - ]; 65 - 66 - enableParallelBuilding = true; 67 - 68 - # required, because otherwise all symbols from HSffi.o are stripped, and 69 - # that in turn causes GHCi to abort 70 - stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!stdenv.isDarwin) "--keep-file-symbols"; 71 - 72 - passthru = { 73 - inherit bootPkgs; 74 - }; 75 - 76 - meta = { 77 - homepage = "http://haskell.org/ghc"; 78 - description = "The dependently-typed 'nokinds' branch of the Glasgow Haskell Compiler by Richard Eisenberg"; 79 - maintainers = with stdenv.lib.maintainers; [ deepfire ]; 80 - inherit (ghc.meta) license platforms; 81 - }; 82 - 83 - }
···
-102
pkgs/development/haskell-modules/configuration-ghc-nokinds.nix
··· 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 - # We have time 1.5 48 - aeson = disableCabalFlag super.aeson "old-locale"; 49 - 50 - # Show works differently for record syntax now, breaking haskell-src-exts' parser tests 51 - # https://github.com/haskell-suite/haskell-src-exts/issues/224 52 - haskell-src-exts = dontCheck super.haskell-src-exts; 53 - 54 - mono-traversable = appendPatch super.mono-traversable (pkgs.fetchpatch { 55 - url = "https://github.com/snoyberg/mono-traversable/pull/77.patch"; 56 - sha256 = "1qrvrh3cqfkymi5yb9y9z88rq4n7ag0ac2k00mcnqh4dz1vh4fg1"; 57 - }); 58 - yesod-auth = appendPatch super.yesod-auth (pkgs.fetchpatch { 59 - url = "https://github.com/yesodweb/yesod/pull/1006.patch"; 60 - sha256 = "0l6wjj8cfz6jy6j92kywsccafyffhlm5240q82bzirb278adqvar"; 61 - stripLen = 1; 62 - }); 63 - 64 - # Setup: At least the following dependencies are missing: base <4.8 65 - hspec-expectations = overrideCabal super.hspec-expectations (drv: { 66 - postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal"; 67 - }); 68 - utf8-string = overrideCabal super.utf8-string (drv: { 69 - postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal"; 70 - }); 71 - 72 - # bos/attoparsec#92 73 - attoparsec = dontCheck super.attoparsec; 74 - 75 - # test suite hangs silently for at least 10 minutes 76 - split = dontCheck super.split; 77 - 78 - # Test suite fails with some (seemingly harmless) error. 79 - # https://code.google.com/p/scrapyourboilerplate/issues/detail?id=24 80 - syb = dontCheck super.syb; 81 - 82 - # Test suite has stricter version bounds 83 - retry = dontCheck super.retry; 84 - 85 - # Test suite fails with time >= 1.5 86 - http-date = dontCheck super.http-date; 87 - 88 - # Version 1.19.5 fails its test suite. 89 - happy = dontCheck super.happy; 90 - 91 - # Workaround for a workaround, see comment for "ghcjs" flag. 92 - jsaddle = let jsaddle' = disableCabalFlag super.jsaddle "ghcjs"; 93 - in addBuildDepends jsaddle' [ self.glib self.gtk3 self.webkitgtk3 94 - self.webkitgtk3-javascriptcore ]; 95 - 96 - # The compat library is empty in the presence of mtl 2.2.x. 97 - mtl-compat = dontHaddock super.mtl-compat; 98 - 99 - # Won't work with LLVM 3.5. 100 - llvm-general = markBrokenVersion "3.4.5.3" super.llvm-general; 101 - 102 - }
···
-9
pkgs/top-level/haskell-packages.nix
··· 58 inherit crossSystem; 59 selfPkgs = packages.ghcHEAD; 60 }; 61 - ghcNokinds = callPackage ../development/compilers/ghc/nokinds.nix rec { 62 - bootPkgs = packages.ghc784; 63 - inherit (bootPkgs) alex happy; 64 - }; 65 - 66 ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs { 67 bootPkgs = packages.ghc7103; 68 }; ··· 137 ghcCross = callPackage ../development/haskell-modules { 138 ghc = compiler.ghcHEAD.crossCompiler; 139 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { }; 140 - }; 141 - ghcNokinds = callPackage ../development/haskell-modules { 142 - ghc = compiler.ghcNokinds; 143 - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-nokinds.nix { }; 144 }; 145 ghcjs = callPackage ../development/haskell-modules { 146 ghc = compiler.ghcjs;
··· 58 inherit crossSystem; 59 selfPkgs = packages.ghcHEAD; 60 }; 61 ghcjs = packages.ghc7103.callPackage ../development/compilers/ghcjs { 62 bootPkgs = packages.ghc7103; 63 }; ··· 132 ghcCross = callPackage ../development/haskell-modules { 133 ghc = compiler.ghcHEAD.crossCompiler; 134 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-head.nix { }; 135 }; 136 ghcjs = callPackage ../development/haskell-modules { 137 ghc = compiler.ghcjs;