ghc: drop 8.8.1

authored by

Gabor Greif and committed by
Peter Simons
a634bd0f daf79ea7

+3 -252
-2
doc/languages-frameworks/haskell.section.md
··· 110 110 haskell.compiler.ghc863Binary ghc-8.6.3-binary 111 111 haskell.compiler.ghc865 ghc-8.6.5 112 112 haskell.compiler.integer-simple.ghc865 ghc-8.6.5 113 - haskell.compiler.ghc881 ghc-8.8.1 114 - haskell.compiler.integer-simple.ghc881 ghc-8.8.1 115 113 haskell.compiler.ghc882 ghc-8.8.2 116 114 haskell.compiler.integer-simple.ghc882 ghc-8.8.2 117 115 haskell.compiler.ghc883 ghc-8.8.3
+3 -3
pkgs/development/compilers/elm/default.nix
··· 4 4 let 5 5 fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; }; 6 6 7 - hsPkgs = haskell.packages.ghc881.override { 7 + hsPkgs = haskell.packages.ghc883.override { 8 8 overrides = self: super: with haskell.lib; 9 9 let elmPkgs = rec { 10 10 elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: { ··· 28 28 `package/nix/build.sh` 29 29 */ 30 30 elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: { 31 - # GHC 8.8.1 support 31 + # GHC 8.8.3 support 32 32 # https://github.com/avh4/elm-format/pull/640 33 33 patches = [( 34 34 fetchpatch { ··· 39 39 # Tests are failing after upgrade to ghc881. 40 40 # Cause is probably just a minor change in stdout output 41 41 # see https://github.com/avh4/elm-format/pull/640 42 - doCheck = false; 42 + # doCheck = false; 43 43 jailbreak = true; 44 44 })); 45 45
-236
pkgs/development/compilers/ghc/8.8.1.nix
··· 1 - { stdenv, pkgsBuildTarget, targetPackages 2 - 3 - # build-tools 4 - , bootPkgs 5 - , autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx 6 - , bash 7 - 8 - , libiconv ? null, ncurses 9 - 10 - , # GHC can be built with system libffi or a bundled one. 11 - libffi ? null 12 - 13 - , useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS 14 - , # LLVM is conceptually a run-time-only depedendency, but for 15 - # non-x86, we need LLVM to bootstrap later stages, so it becomes a 16 - # build-time dependency too. 17 - buildLlvmPackages, llvmPackages 18 - 19 - , # If enabled, GHC will be built with the GPL-free but slower integer-simple 20 - # library instead of the faster but GPLed integer-gmp library. 21 - enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp 22 - 23 - , # If enabled, use -fPIC when compiling static libs. 24 - enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform 25 - 26 - , # Whether to build dynamic libs for the standard library (on the target 27 - # platform). Static libs are always built. 28 - enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt 29 - 30 - , # Whetherto build terminfo. 31 - enableTerminfo ? !stdenv.targetPlatform.isWindows 32 - 33 - , # What flavour to build. An empty string indicates no 34 - # specific flavour and falls back to ghc default values. 35 - ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) 36 - (if useLLVM then "perf-cross" else "perf-cross-ncg") 37 - 38 - , # Whether to disable the large address space allocator 39 - # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ 40 - disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64 41 - }: 42 - 43 - assert !enableIntegerSimple -> gmp != null; 44 - 45 - let 46 - inherit (stdenv) buildPlatform hostPlatform targetPlatform; 47 - 48 - inherit (bootPkgs) ghc; 49 - 50 - # TODO(@Ericson2314) Make unconditional 51 - targetPrefix = stdenv.lib.optionalString 52 - (targetPlatform != hostPlatform) 53 - "${targetPlatform.config}-"; 54 - 55 - buildMK = '' 56 - BuildFlavour = ${ghcFlavour} 57 - ifneq \"\$(BuildFlavour)\" \"\" 58 - include mk/flavours/\$(BuildFlavour).mk 59 - endif 60 - DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"} 61 - INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"} 62 - '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) '' 63 - Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} 64 - CrossCompilePrefix = ${targetPrefix} 65 - HADDOCK_DOCS = NO 66 - BUILD_SPHINX_HTML = NO 67 - BUILD_SPHINX_PDF = NO 68 - '' + stdenv.lib.optionalString enableRelocatedStaticLibs '' 69 - GhcLibHcOpts += -fPIC 70 - GhcRtsHcOpts += -fPIC 71 - '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' 72 - EXTRA_CC_OPTS += -std=gnu99 73 - ''; 74 - 75 - # Splicer will pull out correct variations 76 - libDeps = platform: stdenv.lib.optional enableTerminfo ncurses 77 - ++ [libffi] 78 - ++ stdenv.lib.optional (!enableIntegerSimple) gmp 79 - ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; 80 - 81 - toolsForTarget = [ 82 - pkgsBuildTarget.targetPackages.stdenv.cc 83 - ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm; 84 - 85 - targetCC = builtins.head toolsForTarget; 86 - 87 - # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 88 - # see #84670 and #49071 for more background. 89 - useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl; 90 - 91 - in 92 - stdenv.mkDerivation (rec { 93 - version = "8.8.1"; 94 - name = "${targetPrefix}ghc-${version}"; 95 - 96 - src = fetchurl { 97 - url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; 98 - sha256 = "06kj4fhvijinjafiy4s873n60qly323rdlz9bmc79nhlp3cq72lh"; 99 - }; 100 - 101 - enableParallelBuilding = true; 102 - 103 - outputs = [ "out" "doc" ]; 104 - 105 - postPatch = "patchShebangs ."; 106 - 107 - # GHC is a bit confused on its cross terminology. 108 - preConfigure = '' 109 - for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do 110 - export "''${env#TARGET_}=''${!env}" 111 - done 112 - # GHC is a bit confused on its cross terminology, as these would normally be 113 - # the *host* tools. 114 - export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" 115 - export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" 116 - # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 117 - export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}" 118 - export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" 119 - export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" 120 - export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" 121 - export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" 122 - export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" 123 - export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" 124 - 125 - echo -n "${buildMK}" > mk/build.mk 126 - sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure 127 - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' 128 - export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" 129 - '' + stdenv.lib.optionalString stdenv.isDarwin '' 130 - export NIX_LDFLAGS+=" -no_dtrace_dof" 131 - '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt '' 132 - sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets 133 - '' + stdenv.lib.optionalString targetPlatform.isMusl '' 134 - echo "patching llvm-targets for musl targets..." 135 - echo "Cloning these existing '*-linux-gnu*' targets:" 136 - grep linux-gnu llvm-targets | sed 's/^/ /' 137 - echo "(go go gadget sed)" 138 - sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets 139 - echo "llvm-targets now contains these '*-linux-musl*' targets:" 140 - grep linux-musl llvm-targets | sed 's/^/ /' 141 - 142 - echo "And now patching to preserve '-musleabi' as done with '-gnueabi'" 143 - # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen) 144 - for x in configure aclocal.m4; do 145 - substituteInPlace $x \ 146 - --replace '*-android*|*-gnueabi*)' \ 147 - '*-android*|*-gnueabi*|*-musleabi*)' 148 - done 149 - ''; 150 - 151 - # TODO(@Ericson2314): Always pass "--target" and always prefix. 152 - configurePlatforms = [ "build" "host" ] 153 - ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 154 - # `--with` flags for libraries needed for RTS linker 155 - configureFlags = [ 156 - "--datadir=$doc/share/doc/ghc" 157 - "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" 158 - ] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib" 159 - ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ 160 - "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib" 161 - ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [ 162 - "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" 163 - ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [ 164 - "--enable-bootstrap-with-devel-snapshot" 165 - ] ++ stdenv.lib.optionals useLdGold [ 166 - "CFLAGS=-fuse-ld=gold" 167 - "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" 168 - "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" 169 - ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [ 170 - "--disable-large-address-space" 171 - ]; 172 - 173 - # Make sure we never relax`$PATH` and hooks support for compatibility. 174 - strictDeps = true; 175 - 176 - # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself. 177 - dontAddExtraLibs = true; 178 - 179 - nativeBuildInputs = [ 180 - perl autoconf automake m4 python3 sphinx 181 - ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour 182 - ]; 183 - 184 - # For building runtime libs 185 - depsBuildTarget = toolsForTarget; 186 - 187 - buildInputs = [ perl bash ] ++ (libDeps hostPlatform); 188 - 189 - propagatedBuildInputs = [ targetPackages.stdenv.cc ] 190 - ++ stdenv.lib.optional useLLVM llvmPackages.llvm; 191 - 192 - depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform); 193 - depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform); 194 - 195 - # required, because otherwise all symbols from HSffi.o are stripped, and 196 - # that in turn causes GHCi to abort 197 - stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols"; 198 - 199 - checkTarget = "test"; 200 - 201 - hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie"; 202 - 203 - postInstall = '' 204 - # Install the bash completion file. 205 - install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc 206 - 207 - # Patch scripts to include "readelf" and "cat" in $PATH. 208 - for i in "$out/bin/"*; do 209 - test ! -h $i || continue 210 - egrep --quiet '^#!' <(head -n 1 $i) || continue 211 - sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i 212 - done 213 - ''; 214 - 215 - passthru = { 216 - inherit bootPkgs targetPrefix; 217 - 218 - inherit llvmPackages; 219 - inherit enableShared; 220 - 221 - # Our Cabal compiler name 222 - haskellCompilerName = "ghc-${version}"; 223 - }; 224 - 225 - meta = { 226 - homepage = "http://haskell.org/ghc"; 227 - description = "The Glasgow Haskell Compiler"; 228 - maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ]; 229 - inherit (ghc.meta) license platforms; 230 - }; 231 - 232 - } // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt { 233 - dontStrip = true; 234 - dontPatchELF = true; 235 - noAuditTmpdir = true; 236 - })
-11
pkgs/top-level/haskell-packages.nix
··· 56 56 buildLlvmPackages = buildPackages.llvmPackages_6; 57 57 llvmPackages = pkgs.llvmPackages_6; 58 58 }; 59 - ghc881 = callPackage ../development/compilers/ghc/8.8.1.nix { 60 - bootPkgs = packages.ghc865Binary; 61 - inherit (buildPackages.python3Packages) sphinx; 62 - buildLlvmPackages = buildPackages.llvmPackages_7; 63 - llvmPackages = pkgs.llvmPackages_7; 64 - }; 65 59 ghc882 = callPackage ../development/compilers/ghc/8.8.2.nix { 66 60 bootPkgs = packages.ghc865Binary; 67 61 inherit (buildPackages.python3Packages) sphinx; ··· 133 127 buildHaskellPackages = bh.packages.ghc865; 134 128 ghc = bh.compiler.ghc865; 135 129 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.6.x.nix { }; 136 - }; 137 - ghc881 = callPackage ../development/haskell-modules { 138 - buildHaskellPackages = bh.packages.ghc881; 139 - ghc = bh.compiler.ghc881; 140 - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.8.x.nix { }; 141 130 }; 142 131 ghc882 = callPackage ../development/haskell-modules { 143 132 buildHaskellPackages = bh.packages.ghc882;