haskell.compiler.ghc865Binary: add powerpc64le bootstrap

authored by Adam Joseph and committed by GitHub 86c7c091 f6b27dac

+19 -3
+7 -2
pkgs/development/compilers/ghc/8.6.5-binary.nix
··· 12 12 let 13 13 useLLVM = !stdenv.targetPlatform.isx86; 14 14 15 - useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux"; 15 + useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux" 16 + || (with stdenv.hostPlatform; isPower64 && isLittleEndian); 16 17 17 18 ourNcurses = if useNcurses6 then ncurses6 else ncurses5; 18 19 ··· 72 73 x86_64-darwin = { 73 74 url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; 74 75 sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz"; 76 + }; 77 + powerpc64le-linux = { 78 + url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-powerpc64le-fedora29-linux.tar.xz"; 79 + sha256 = "sha256-tWSsJdPVrCiqDyIKzpBt5DaXb3b6j951tCya584kWs4="; 75 80 }; 76 81 }.${stdenv.hostPlatform.system} 77 82 or (throw "cannot bootstrap GHC on this platform")); ··· 211 216 212 217 meta = rec { 213 218 license = lib.licenses.bsd3; 214 - platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"]; 219 + platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "powerpc64le-linux" ]; 215 220 # build segfaults, use ghc8102Binary which has proper musl support instead 216 221 broken = stdenv.hostPlatform.isMusl; 217 222 maintainers = with lib.maintainers; [
+12 -1
pkgs/top-level/haskell-packages.nix
··· 108 108 # Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them 109 109 if stdenv.isAarch64 || stdenv.isAarch32 then 110 110 packages.ghc8107BinaryMinimal 111 + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 112 + # to my (@a-m-joseph) knowledge there are no newer official binaries for this platform 113 + packages.ghc865Binary 111 114 else 112 115 packages.ghc8107Binary; 113 116 inherit (buildPackages.python3Packages) sphinx; ··· 124 127 # the oldest ghc with aarch64-darwin support is 8.10.5 125 128 if stdenv.isAarch64 || stdenv.isAarch32 then 126 129 packages.ghc8107BinaryMinimal 130 + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 131 + packages.ghc8107 127 132 else 128 133 packages.ghc8107Binary; 129 134 inherit (buildPackages.python3Packages) sphinx; ··· 136 141 # aarch64 ghc8107Binary exceeds max output size on hydra 137 142 if stdenv.isAarch64 || stdenv.isAarch32 then 138 143 packages.ghc8107BinaryMinimal 144 + else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 145 + packages.ghc8107 139 146 else 140 147 packages.ghc8107Binary; 141 148 inherit (buildPackages.python3Packages) sphinx; ··· 147 154 llvmPackages = pkgs.llvmPackages_12; 148 155 }; 149 156 ghcHEAD = callPackage ../development/compilers/ghc/head.nix { 150 - bootPkgs = packages.ghc8107Binary; 157 + bootPkgs = 158 + if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then 159 + packages.ghc8107 160 + else 161 + packages.ghc8107Binary; 151 162 inherit (buildPackages.python3Packages) sphinx; 152 163 # Need to use apple's patched xattr until 153 164 # https://github.com/xattr/xattr/issues/44 and