Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 perl, 6 gcc, 7 ncurses5, 8 ncurses6, 9 gmp, 10 libiconv, 11 numactl, 12 llvmPackages, 13 coreutils, 14 rcodesign, 15 targetPackages, 16 17 # minimal = true; will remove files that aren't strictly necessary for 18 # regular builds and GHC bootstrapping. 19 # This is "useful" for staying within hydra's output limits for at least the 20 # aarch64-linux architecture. 21 minimal ? false, 22}: 23 24# Prebuilt only does native 25assert stdenv.targetPlatform == stdenv.hostPlatform; 26 27let 28 downloadsUrl = "https://downloads.haskell.org/ghc"; 29 30 # Copy sha256 from https://downloads.haskell.org/~ghc/8.10.7/SHA256SUMS 31 version = "8.10.7"; 32 33 # Information about available bindists that we use in the build. 34 # 35 # # Bindist library checking 36 # 37 # The field `archSpecificLibraries` also provides a way for us get notified 38 # early when the upstream bindist changes its dependencies (e.g. because a 39 # newer Debian version is used that uses a new `ncurses` version). 40 # 41 # Usage: 42 # 43 # * You can find the `fileToCheckFor` of libraries by running `readelf -d` 44 # on the compiler binary (`exePathForLibraryCheck`). 45 # * To skip library checking for an architecture, 46 # set `exePathForLibraryCheck = null`. 47 # * To skip file checking for a specific arch specific library, 48 # set `fileToCheckFor = null`. 49 ghcBinDists = { 50 # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin) 51 # nixpkgs uses for the respective system. 52 defaultLibc = { 53 i686-linux = { 54 variantSuffix = ""; 55 src = { 56 url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; 57 sha256 = "fbfc1ef194f4e7a4c0da8c11cc69b17458a4b928b609b3622c97acc4acd5c5ab"; 58 }; 59 exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; 60 archSpecificLibraries = [ 61 { 62 nixPackage = gmp; 63 fileToCheckFor = null; 64 } 65 # The i686-linux bindist provided by GHC HQ is currently built on Debian 9, 66 # which link it against `libtinfo.so.5` (ncurses 5). 67 # Other bindists are linked `libtinfo.so.6` (ncurses 6). 68 { 69 nixPackage = ncurses5; 70 fileToCheckFor = "libtinfo.so.5"; 71 } 72 ]; 73 }; 74 x86_64-linux = { 75 variantSuffix = ""; 76 src = { 77 url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; 78 sha256 = "a13719bca87a0d3ac0c7d4157a4e60887009a7f1a8dbe95c4759ec413e086d30"; 79 }; 80 exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; 81 archSpecificLibraries = [ 82 { 83 nixPackage = gmp; 84 fileToCheckFor = null; 85 } 86 { 87 nixPackage = ncurses6; 88 fileToCheckFor = "libtinfo.so.6"; 89 } 90 ]; 91 }; 92 armv7l-linux = { 93 variantSuffix = ""; 94 src = { 95 url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; 96 sha256 = "3949c31bdf7d3b4afb765ea8246bca4ca9707c5d988d9961a244f0da100956a2"; 97 }; 98 exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; 99 archSpecificLibraries = [ 100 { 101 nixPackage = gmp; 102 fileToCheckFor = null; 103 } 104 { 105 nixPackage = ncurses6; 106 fileToCheckFor = "libtinfo.so.6"; 107 } 108 ]; 109 }; 110 aarch64-linux = { 111 variantSuffix = ""; 112 src = { 113 url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; 114 sha256 = "fad2417f9b295233bf8ade79c0e6140896359e87be46cb61cd1d35863d9d0e55"; 115 }; 116 exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; 117 archSpecificLibraries = [ 118 { 119 nixPackage = gmp; 120 fileToCheckFor = null; 121 } 122 { 123 nixPackage = ncurses6; 124 fileToCheckFor = "libtinfo.so.6"; 125 } 126 { 127 nixPackage = numactl; 128 fileToCheckFor = null; 129 } 130 ]; 131 }; 132 x86_64-darwin = { 133 variantSuffix = ""; 134 src = { 135 url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; 136 sha256 = "287db0f9c338c9f53123bfa8731b0996803ee50f6ee847fe388092e5e5132047"; 137 }; 138 exePathForLibraryCheck = null; # we don't have a library check for darwin yet 139 archSpecificLibraries = [ 140 { 141 nixPackage = gmp; 142 fileToCheckFor = null; 143 } 144 { 145 nixPackage = ncurses6; 146 fileToCheckFor = null; 147 } 148 { 149 nixPackage = libiconv; 150 fileToCheckFor = null; 151 } 152 ]; 153 }; 154 aarch64-darwin = { 155 variantSuffix = ""; 156 src = { 157 url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; 158 sha256 = "dc469fc3c35fd2a33a5a575ffce87f13de7b98c2d349a41002e200a56d9bba1c"; 159 }; 160 exePathForLibraryCheck = null; # we don't have a library check for darwin yet 161 archSpecificLibraries = [ 162 { 163 nixPackage = gmp; 164 fileToCheckFor = null; 165 } 166 { 167 nixPackage = ncurses6; 168 fileToCheckFor = null; 169 } 170 { 171 nixPackage = libiconv; 172 fileToCheckFor = null; 173 } 174 ]; 175 }; 176 }; 177 # Binary distributions for the musl libc for the respective system. 178 musl = { 179 x86_64-linux = { 180 variantSuffix = "-musl-integer-simple"; 181 src = { 182 url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz"; 183 sha256 = "16903df850ef73d5246f2ff169cbf57ecab76c2ac5acfa9928934282cfad575c"; 184 }; 185 exePathForLibraryCheck = "bin/ghc"; 186 archSpecificLibraries = [ 187 # No `gmp` here, since this is an `integer-simple` bindist. 188 189 # In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*` 190 # instead of `libtinfo.so.*.` 191 { 192 nixPackage = ncurses6; 193 fileToCheckFor = "libncursesw.so.6"; 194 } 195 ]; 196 isHadrian = true; 197 }; 198 }; 199 }; 200 201 distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc"; 202 203 binDistUsed = 204 ghcBinDists.${distSetName}.${stdenv.hostPlatform.system} 205 or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')"); 206 207 useLLVM = !(import ./common-have-ncg.nix { inherit lib stdenv version; }); 208 209 libPath = lib.makeLibraryPath ( 210 # Add arch-specific libraries. 211 map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries 212 ); 213 214 libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; 215 216 runtimeDeps = [ 217 targetPackages.stdenv.cc 218 targetPackages.stdenv.cc.bintools 219 coreutils # for cat 220 ] 221 ++ lib.optionals useLLVM [ 222 (lib.getBin llvmPackages.llvm) 223 ] 224 # On darwin, we need unwrapped bintools as well (for otool) 225 ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ 226 targetPackages.stdenv.cc.bintools.bintools 227 ]; 228 229in 230 231stdenv.mkDerivation { 232 inherit version; 233 pname = "ghc-binary${binDistUsed.variantSuffix}"; 234 235 src = fetchurl binDistUsed.src; 236 237 # Note that for GHC 8.10 versions >= 8.10.6, the GHC HQ musl bindist 238 # uses `integer-simple` and has no `gmp` dependency: 239 # https://gitlab.haskell.org/ghc/ghc/-/commit/8306501020cd66f683ad9c215fa8e16c2d62357d 240 # Related nixpkgs issues: 241 # * https://github.com/NixOS/nixpkgs/pull/130441#issuecomment-922452843 242 # TODO: When this file is copied to `ghc-9.*-binary.nix`, determine whether 243 # the GHC 9 branch also switched from `gmp` to `integer-simple` via the 244 # currently-open issue: 245 # https://gitlab.haskell.org/ghc/ghc/-/issues/20059 246 # and update this comment accordingly. 247 248 nativeBuildInputs = [ 249 perl 250 ] 251 # Upstream binaries may not be linker-signed, which invalidates their signatures 252 # because `install_name_tool` will only replace a signature if it is both 253 # an ad hoc signature and the signature is flagged as linker-signed. 254 # 255 # rcodesign is used to replace the signature instead of sigtool because it 256 # supports setting the linker-signed flag, which will ensure future processing 257 # of the binaries does not invalidate their signatures. 258 ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ rcodesign ]; 259 260 # Set LD_LIBRARY_PATH or equivalent so that the programs running as part 261 # of the bindist installer can find the libraries they expect. 262 # Cannot patchelf beforehand due to relative RPATHs that anticipate 263 # the final install location. 264 ${libEnvVar} = libPath; 265 266 postUnpack = 267 # Verify our assumptions of which `libtinfo.so` (ncurses) version is used, 268 # so that we know when ghc bindists upgrade that and we need to update the 269 # version used in `libPath`. 270 lib.optionalString (binDistUsed.exePathForLibraryCheck != null) 271 # Note the `*` glob because some GHCs have a suffix when unpacked, e.g. 272 # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`. 273 # As a result, don't shell-quote this glob when splicing the string. 274 ( 275 let 276 buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; 277 in 278 lib.concatStringsSep "\n" [ 279 ('' 280 shopt -u nullglob 281 echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" 282 if ! test -e ${buildExeGlob}; then 283 echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; 284 fi 285 '') 286 (lib.concatMapStringsSep "\n" ( 287 { fileToCheckFor, nixPackage }: 288 lib.optionalString (fileToCheckFor != null) '' 289 echo "Checking bindist for ${fileToCheckFor} to ensure that is still used" 290 if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then 291 echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; 292 fi 293 294 echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}" 295 if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then 296 echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; 297 fi 298 '' 299 ) binDistUsed.archSpecificLibraries) 300 ] 301 ) 302 # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib 303 # during linking 304 + lib.optionalString stdenv.hostPlatform.isDarwin ( 305 '' 306 export NIX_LDFLAGS+=" -no_dtrace_dof" 307 # not enough room in the object files for the full path to libiconv :( 308 for exe in $(find . -type f -executable); do 309 isScript $exe && continue 310 ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib 311 install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe 312 '' 313 + lib.optionalString stdenv.hostPlatform.isAarch64 '' 314 # Resign the binary and set the linker-signed flag. Ignore failures when the file is an object file. 315 # Object files dont have signatures, so ignoring the failures is harmless. 316 rcodesign sign --code-signature-flags linker-signed $exe || true 317 '' 318 + '' 319 done 320 '' 321 ) 322 + 323 324 # Some scripts used during the build need to have their shebangs patched 325 '' 326 patchShebangs ghc-${version}/utils/ 327 patchShebangs ghc-${version}/configure 328 test -d ghc-${version}/inplace/bin && \ 329 patchShebangs ghc-${version}/inplace/bin 330 '' 331 + 332 # We have to patch the GMP paths for the integer-gmp package. 333 # Note that musl bindists do not contain them, 334 # see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231 335 # However, musl bindists >= 8.10.6 use `integer-simple`, not `gmp`. 336 '' 337 find . -name integer-gmp.buildinfo \ 338 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \; 339 '' 340 + lib.optionalString stdenv.hostPlatform.isDarwin '' 341 find . -name base.buildinfo \ 342 -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \; 343 '' 344 + 345 # Some platforms do HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in 346 # FFI_LIB_DIR is a good indication of places it must be needed. 347 lib.optionalString 348 ( 349 lib.meta.availableOn stdenv.hostPlatform numactl 350 && builtins.any ({ nixPackage, ... }: nixPackage == numactl) binDistUsed.archSpecificLibraries 351 ) 352 '' 353 find . -name package.conf.in \ 354 -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; 355 '' 356 + 357 # Rename needed libraries and binaries, fix interpreter 358 lib.optionalString stdenv.hostPlatform.isLinux '' 359 find . -type f -executable -exec patchelf \ 360 --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; 361 '' 362 + 363 # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path 364 # substitution. Which can break the build if the store path / prefix happens 365 # to contain this string. This will be fixed with 9.4 bindists. 366 # https://gitlab.haskell.org/ghc/ghc/-/issues/21402 367 '' 368 # Detect hadrian Makefile by checking for the target that has the problem 369 if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then 370 echo Hadrian bindist, applying workaround for xxx path substitution. 371 # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch 372 substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0' 373 else 374 echo Not a hadrian bindist, not applying xxx path workaround. 375 fi 376 ''; 377 378 # fix for `configure: error: Your linker is affected by binutils #16177` 379 preConfigure = lib.optionalString stdenv.targetPlatform.isAarch32 "LD=ld.gold"; 380 381 configurePlatforms = [ ]; 382 configureFlags = [ 383 "--with-gmp-includes=${lib.getDev gmp}/include" 384 # Note `--with-gmp-libraries` does nothing for GHC bindists: 385 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 386 ] 387 ++ lib.optional stdenv.hostPlatform.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" 388 # From: https://github.com/NixOS/nixpkgs/pull/43369/commits 389 ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; 390 391 # No building is necessary, but calling make without flags ironically 392 # calls install-strip ... 393 dontBuild = true; 394 395 # GHC tries to remove xattrs when installing to work around Gatekeeper 396 # (see https://gitlab.haskell.org/ghc/ghc/-/issues/17418). This step normally 397 # succeeds in nixpkgs because xattrs are not allowed in the store, but it 398 # can fail when a file has the `com.apple.provenance` xattr, and it can’t be 399 # modified (such as target of the symlink to `libiconv.dylib`). 400 # The `com.apple.provenance` xattr is a new feature of macOS as of macOS 13. 401 # See: https://eclecticlight.co/2023/03/13/ventura-has-changed-app-quarantine-with-a-new-xattr/ 402 makeFlags = lib.optionals stdenv.buildPlatform.isDarwin [ "XATTR=/does-not-exist" ]; 403 404 # Patch scripts to include runtime dependencies in $PATH. 405 postInstall = '' 406 for i in "$out/bin/"*; do 407 test ! -h "$i" || continue 408 isScript "$i" || continue 409 sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" 410 done 411 ''; 412 413 # Apparently necessary for the ghc Alpine (musl) bindist: 414 # When we strip, and then run the 415 # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p 416 # below, running ghc (e.g. during `installCheckPhase)` gives some apparently 417 # corrupted rpath or whatever makes the loader work on nonsensical strings: 418 # running install tests 419 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found 420 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found 421 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found 422 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found 423 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found 424 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found 425 # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found 426 # This is extremely bogus and should be investigated. 427 dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness 428 429 # On Linux, use patchelf to modify the executables so that they can 430 # find editline/gmp. 431 postFixup = 432 lib.optionalString stdenv.hostPlatform.isLinux ( 433 if stdenv.hostPlatform.isAarch64 then 434 # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs 435 # are 2 directories deep from $out/lib, so pooling symlinks there makes 436 # a short rpath. 437 '' 438 (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6) 439 (cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10) 440 (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1) 441 for p in $(find "$out/lib" -type f -name "*\.so*"); do 442 (cd $out/lib; ln -s $p) 443 done 444 445 for p in $(find "$out/lib" -type f -executable); do 446 if isELF "$p"; then 447 echo "Patchelfing $p" 448 patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p 449 fi 450 done 451 '' 452 else 453 '' 454 for p in $(find "$out" -type f -executable); do 455 if isELF "$p"; then 456 echo "Patchelfing $p" 457 patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p 458 fi 459 done 460 '' 461 ) 462 + lib.optionalString stdenv.hostPlatform.isDarwin '' 463 # not enough room in the object files for the full path to libiconv :( 464 for exe in $(find "$out" -type f -executable); do 465 isScript $exe && continue 466 ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib 467 install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe 468 done 469 470 for file in $(find "$out" -name setup-config); do 471 substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" 472 done 473 '' 474 + lib.optionalString minimal '' 475 # Remove profiling files 476 find $out -type f -name '*.p_o' -delete 477 find $out -type f -name '*.p_hi' -delete 478 find $out -type f -name '*_p.a' -delete 479 # `-f` because e.g. musl bindist does not have this file. 480 rm -f $out/lib/ghc-*/bin/ghc-iserv-prof 481 # Hydra will redistribute this derivation, so we have to keep the docs for 482 # legal reasons (retaining the legal notices etc) 483 # As a last resort we could unpack the docs separately and symlink them in. 484 # They're in $out/share/{doc,man}. 485 ''; 486 487 # GHC cannot currently produce outputs that are ready for `-pie` linking. 488 # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. 489 # See: 490 # * https://github.com/NixOS/nixpkgs/issues/129247 491 # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 492 hardeningDisable = [ "pie" ]; 493 494 doInstallCheck = true; 495 installCheckPhase = '' 496 # Sanity check, can ghc create executables? 497 cd $TMP 498 mkdir test-ghc; cd test-ghc 499 cat > main.hs << EOF 500 {-# LANGUAGE TemplateHaskell #-} 501 module Main where 502 main = putStrLn \$([|"yes"|]) 503 EOF 504 env -i $out/bin/ghc --make main.hs || exit 1 505 echo compilation ok 506 [ $(./main) == "yes" ] 507 ''; 508 509 passthru = { 510 targetPrefix = ""; 511 enableShared = true; 512 513 inherit llvmPackages; 514 515 # Our Cabal compiler name 516 haskellCompilerName = "ghc-${version}"; 517 } 518 # We duplicate binDistUsed here since we have a sensible default even if no bindist is available, 519 # this makes sure that getting the `meta` attribute doesn't throw even on unsupported platforms. 520 // lib.optionalAttrs (ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}.isHadrian or false) { 521 # Normal GHC derivations expose the hadrian derivation used to build them 522 # here. In the case of bindists we just make sure that the attribute exists, 523 # as it is used for checking if a GHC derivation has been built with hadrian. 524 # The isHadrian mechanism will become obsolete with GHCs that use hadrian 525 # exclusively, i.e. 9.6 (and 9.4?). 526 hadrian = null; 527 }; 528 529 meta = rec { 530 homepage = "http://haskell.org/ghc"; 531 description = "Glasgow Haskell Compiler"; 532 license = lib.licenses.bsd3; 533 # HACK: since we can't encode the libc / abi in platforms, we need 534 # to make the platform list dependent on the evaluation platform 535 # in order to avoid eval errors with musl which supports less 536 # platforms than the default libcs (i. e. glibc / libSystem). 537 # This is done for the benefit of Hydra, so `packagePlatforms` 538 # won't return any platforms that would cause an evaluation 539 # failure for `pkgsMusl.haskell.compiler.ghc8107Binary`, as 540 # long as the evaluator runs on a platform that supports 541 # `pkgsMusl`. 542 platforms = builtins.attrNames ghcBinDists.${distSetName}; 543 maintainers = with lib.maintainers; [ 544 prusnak 545 ]; 546 teams = [ lib.teams.haskell ]; 547 }; 548}