haskell.compiler.ghc{8107{,Binary},928}: drop (#440794)

authored by

Wolfgang Walther and committed by
GitHub
a9b86987 ec22338b

+44 -2264
+1 -1
doc/languages-frameworks/haskell.section.md
··· 1305 1305 # Name of the compiler and package set you want to change. If you are using 1306 1306 # the default package set `haskellPackages`, you need to look up what version 1307 1307 # of GHC it currently uses (note that this is subject to change). 1308 - ghcName = "ghc92"; 1308 + ghcName = "ghc910"; 1309 1309 # Desired new setting 1310 1310 enableProfiling = true; 1311 1311
+5 -3
doc/release-notes/rl-2511.section.md
··· 24 24 25 25 - GCC 9, 10, 11, and 12 have been removed, as they have reached end‐of‐life upstream and are no longer supported. 26 26 27 - - GHC 8.6 and its package set have been removed. It was only used to bootstrap GHC for powerpc64le, but this was probably broken anyway. 28 - 29 27 - GHCJS 8.10, exposed via `haskell.compiler.ghcjs` and `haskell.compiler.ghcjs810`, has been removed. Downstream users should migrate their projects to the new JavaScript backend of GHC proper which can be used via `pkgsCross.ghcjs` from Nixpkgs. Haskell packaging code, like `haskellPackages.mkDerivation`, `ghcWithPackages` and `hoogleWithPackages`, also no longer supports GHCJS. 30 28 31 - - GHC 9.0 and its package set have been removed. 29 + - GHC 8.6, 8.10, 9.0, 9.2, and their package sets have been removed. 30 + 31 + - Support for bootstrapping native GHC compilers on 32‐bit ARM and little‐endian 64‐bit PowerPC has been dropped. 32 + The latter was probably broken anyway. 33 + If there is interest in restoring support for these architectures, it should be possible to cross‐compile a bootstrap GHC binary. 32 34 33 35 - `base16-builder` node package has been removed due to lack of upstream maintenance. 34 36
+2 -2
lib/options.nix
··· 267 267 268 268 mkPackageOption pkgs "GHC" { 269 269 default = [ "ghc" ]; 270 - example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; 270 + example = "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])"; 271 271 } 272 - => { ...; default = pkgs.ghc; defaultText = literalExpression "pkgs.ghc"; description = "The GHC package to use."; example = literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; type = package; } 272 + => { ...; default = pkgs.ghc; defaultText = literalExpression "pkgs.ghc"; description = "The GHC package to use."; example = literalExpression "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])"; type = package; } 273 273 274 274 mkPackageOption pkgs [ "python3Packages" "pytorch" ] { 275 275 extraDescription = "This is an example and doesn't actually do anything.";
+2 -2
maintainers/scripts/haskell/test-configurations.nix
··· 6 6 and builds all derivations (or at least a reasonable subset) affected by 7 7 these overrides. 8 8 9 - By default, it checks `configuration-{common,nix,ghc-8.10.x}.nix`. You can 9 + By default, it checks `configuration-{common,nix,ghc-9.8.x}.nix`. You can 10 10 invoke it like this: 11 11 12 12 nix-build maintainers/scripts/haskell/test-configurations.nix --keep-going ··· 50 50 files ? [ 51 51 "configuration-common.nix" 52 52 "configuration-nix.nix" 53 - "configuration-ghc-8.10.x.nix" 53 + "configuration-ghc-9.8.x.nix" 54 54 ], 55 55 nixpkgsPath ? ../../.., 56 56 config ? {
+2 -2
nixos/doc/manual/development/option-declarations.section.md
··· 152 152 lib.mkPackageOption pkgs "GHC" 153 153 { 154 154 default = [ "ghc" ]; 155 - example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; 155 + example = "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])"; 156 156 } 157 157 # is like 158 158 lib.mkOption ··· 160 160 type = lib.types.package; 161 161 default = pkgs.ghc; 162 162 defaultText = lib.literalExpression "pkgs.ghc"; 163 - example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; 163 + example = lib.literalExpression "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])"; 164 164 description = "The GHC package to use."; 165 165 } 166 166 ```
+1 -1
nixos/modules/services/x11/window-managers/xmonad.nix
··· 74 74 haskellPackages = mkOption { 75 75 default = pkgs.haskellPackages; 76 76 defaultText = literalExpression "pkgs.haskellPackages"; 77 - example = literalExpression "pkgs.haskell.packages.ghc810"; 77 + example = literalExpression "pkgs.haskell.packages.ghc910"; 78 78 type = types.attrs; 79 79 description = '' 80 80 haskellPackages used to build Xmonad and other packages.
-546
pkgs/development/compilers/ghc/8.10.7-binary.nix
··· 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 25 - assert stdenv.targetPlatform == stdenv.hostPlatform; 26 - 27 - let 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 - 229 - in 230 - 231 - stdenv.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 $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 don’t 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 $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 - teams = [ lib.teams.haskell ]; 545 - }; 546 - }
-681
pkgs/development/compilers/ghc/8.10.7.nix
··· 1 - let 2 - version = "8.10.7"; 3 - in 4 - 5 - { 6 - lib, 7 - stdenv, 8 - pkgsBuildTarget, 9 - pkgsHostTarget, 10 - buildPackages, 11 - targetPackages, 12 - 13 - # build-tools 14 - bootPkgs, 15 - autoreconfHook, 16 - autoconf, 17 - automake, 18 - coreutils, 19 - fetchpatch, 20 - fetchurl, 21 - perl, 22 - python3, 23 - m4, 24 - sphinx, 25 - xattr, 26 - autoSignDarwinBinariesHook, 27 - bash, 28 - 29 - libiconv ? null, 30 - ncurses, 31 - 32 - # GHC can be built with system libffi or a bundled one. 33 - # we explicitly use libffi-3.3 here because 3.4 removes a flag that causes 34 - # problems for ghc-8.10.7's RTS. See #324384. 35 - # Save for aarch_darwin since libffi-3.3 is broken there but the issue isn't present anyway 36 - libffi ? null, 37 - libffi_3_3 ? null, 38 - 39 - useLLVM ? !(import ./common-have-ncg.nix { inherit lib stdenv version; }), 40 - # LLVM is conceptually a run-time-only dependency, but for 41 - # non-x86, we need LLVM to bootstrap later stages, so it becomes a 42 - # build-time dependency too. 43 - buildTargetLlvmPackages, 44 - llvmPackages, 45 - 46 - # If enabled, GHC will be built with the GPL-free but slower integer-simple 47 - # library instead of the faster but GPLed integer-gmp library. 48 - enableIntegerSimple ? 49 - !(lib.meta.availableOn stdenv.hostPlatform gmp && lib.meta.availableOn stdenv.targetPlatform gmp), 50 - gmp, 51 - 52 - # If enabled, use -fPIC when compiling static libs. 53 - enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform, 54 - 55 - # Exceeds Hydra output limit (at the time of writing ~3GB) when cross compiled to riscv64. 56 - # A riscv64 cross-compiler fits into the limit comfortably. 57 - enableProfiledLibs ? !stdenv.hostPlatform.isRiscV64, 58 - 59 - # Whether to build dynamic libs for the standard library (on the target 60 - # platform). Static libs are always built. 61 - enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt, 62 - 63 - # Whether to build terminfo. 64 - enableTerminfo ? 65 - !( 66 - stdenv.targetPlatform.isWindows 67 - # terminfo can't be built for cross 68 - || (stdenv.buildPlatform != stdenv.hostPlatform) 69 - || (stdenv.hostPlatform != stdenv.targetPlatform) 70 - ), 71 - 72 - # Enable NUMA support in RTS 73 - enableNuma ? lib.meta.availableOn stdenv.targetPlatform numactl, 74 - numactl, 75 - 76 - # What flavour to build. An empty string indicates no 77 - # specific flavour and falls back to ghc default values. 78 - ghcFlavour ? lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) ( 79 - if useLLVM then "perf-cross" else "perf-cross-ncg" 80 - ), 81 - 82 - # Whether to build sphinx documentation. 83 - enableDocs ? ( 84 - # Docs disabled if we are building on musl because it's a large task to keep 85 - # all `sphinx` dependencies building in this environment. 86 - !stdenv.buildPlatform.isMusl 87 - ), 88 - 89 - enableHaddockProgram ? 90 - # Disabled for cross; see note [HADDOCK_DOCS]. 91 - (stdenv.buildPlatform == stdenv.hostPlatform && stdenv.targetPlatform == stdenv.hostPlatform), 92 - 93 - # Whether to disable the large address space allocator 94 - # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/ 95 - disableLargeAddressSpace ? stdenv.targetPlatform.isiOS, 96 - 97 - # Whether to build an unregisterised version of GHC. 98 - # GHC will normally auto-detect whether it can do a registered build, but this 99 - # option will force it to do an unregistered build when set to true. 100 - # See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/unregisterised 101 - enableUnregisterised ? false, 102 - }@args: 103 - 104 - assert !enableIntegerSimple -> gmp != null; 105 - 106 - # Cross cannot currently build the `haddock` program for silly reasons, 107 - # see note [HADDOCK_DOCS]. 108 - assert 109 - (stdenv.buildPlatform != stdenv.hostPlatform || stdenv.targetPlatform != stdenv.hostPlatform) 110 - -> !enableHaddockProgram; 111 - 112 - # GHC does not support building when all 3 platforms are different. 113 - assert stdenv.buildPlatform == stdenv.hostPlatform || stdenv.hostPlatform == stdenv.targetPlatform; 114 - 115 - let 116 - inherit (stdenv) buildPlatform hostPlatform targetPlatform; 117 - 118 - # TODO(@Ericson2314) Make unconditional 119 - targetPrefix = lib.optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-"; 120 - 121 - buildMK = '' 122 - BuildFlavour = ${ghcFlavour} 123 - ifneq \"\$(BuildFlavour)\" \"\" 124 - include mk/flavours/\$(BuildFlavour).mk 125 - endif 126 - BUILD_SPHINX_HTML = ${if enableDocs then "YES" else "NO"} 127 - BUILD_SPHINX_PDF = NO 128 - 129 - WITH_TERMINFO = ${if enableTerminfo then "YES" else "NO"} 130 - '' 131 - + 132 - # Note [HADDOCK_DOCS]: 133 - # Unfortunately currently `HADDOCK_DOCS` controls both whether the `haddock` 134 - # program is built (which we generally always want to have a complete GHC install) 135 - # and whether it is run on the GHC sources to generate hyperlinked source code 136 - # (which is impossible for cross-compilation); see: 137 - # https://gitlab.haskell.org/ghc/ghc/-/issues/20077 138 - # This implies that currently a cross-compiled GHC will never have a `haddock` 139 - # program, so it can never generate haddocks for any packages. 140 - # If this is solved in the future, we'd like to unconditionally 141 - # build the haddock program (removing the `enableHaddockProgram` option). 142 - '' 143 - HADDOCK_DOCS = ${if enableHaddockProgram then "YES" else "NO"} 144 - # Build haddocks for boot packages with hyperlinking 145 - EXTRA_HADDOCK_OPTS += --hyperlinked-source --quickjump 146 - 147 - DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"} 148 - INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"} 149 - '' 150 - + lib.optionalString (targetPlatform != hostPlatform) '' 151 - Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"} 152 - CrossCompilePrefix = ${targetPrefix} 153 - '' 154 - + lib.optionalString (!enableProfiledLibs) '' 155 - BUILD_PROF_LIBS = NO 156 - '' 157 - + lib.optionalString enableRelocatedStaticLibs '' 158 - GhcLibHcOpts += -fPIC 159 - GhcRtsHcOpts += -fPIC 160 - '' 161 - + lib.optionalString targetPlatform.useAndroidPrebuilt '' 162 - EXTRA_CC_OPTS += -std=gnu99 163 - '' 164 - # While split sections are now enabled by default in ghc 8.8 for windows, 165 - # they seem to lead to `too many sections` errors when building base for 166 - # profiling. 167 - + lib.optionalString targetPlatform.isWindows '' 168 - SplitSections = NO 169 - ''; 170 - 171 - # Splicer will pull out correct variations 172 - libDeps = 173 - platform: 174 - lib.optional enableTerminfo ncurses 175 - ++ [ args.${libffi_name} ] 176 - ++ lib.optional (!enableIntegerSimple) gmp 177 - ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; 178 - 179 - # TODO(@sternenseemann): is buildTarget LLVM unnecessary? 180 - # GHC doesn't seem to have {LLC,OPT}_HOST 181 - toolsForTarget = [ 182 - pkgsBuildTarget.targetPackages.stdenv.cc 183 - ] 184 - ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; 185 - 186 - buildCC = buildPackages.stdenv.cc; 187 - targetCC = builtins.head toolsForTarget; 188 - installCC = pkgsHostTarget.targetPackages.stdenv.cc; 189 - 190 - # toolPath calculates the absolute path to the name tool associated with a 191 - # given `stdenv.cc` derivation, i.e. it picks the correct derivation to take 192 - # the tool from (cc, cc.bintools, cc.bintools.bintools) and adds the correct 193 - # subpath of the tool. 194 - toolPath = 195 - name: cc: 196 - let 197 - tools = 198 - { 199 - "cc" = cc; 200 - "c++" = cc; 201 - as = cc.bintools; 202 - 203 - ar = cc.bintools; 204 - ranlib = cc.bintools; 205 - nm = cc.bintools; 206 - readelf = cc.bintools; 207 - objdump = cc.bintools; 208 - 209 - ld = cc.bintools; 210 - "ld.gold" = cc.bintools; 211 - 212 - otool = cc.bintools.bintools; 213 - 214 - # GHC needs install_name_tool on all darwin platforms. The same one can 215 - # be used on both platforms. It is safe to use with linker-generated 216 - # signatures because it will update the signatures automatically after 217 - # modifying the target binary. 218 - install_name_tool = cc.bintools.bintools; 219 - 220 - # strip on darwin is wrapped to enable deterministic mode. 221 - strip = 222 - # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" 223 - if stdenv.targetPlatform.isDarwin then cc.bintools else cc.bintools.bintools; 224 - 225 - # clang is used as an assembler on darwin with the LLVM backend 226 - clang = cc; 227 - } 228 - .${name}; 229 - in 230 - "${tools}/bin/${tools.targetPrefix}${name}"; 231 - 232 - # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. 233 - # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 234 - # see #84670 and #49071 for more background. 235 - useLdGold = 236 - targetPlatform.linker == "gold" 237 - || ( 238 - targetPlatform.linker == "bfd" 239 - && (targetCC.bintools.bintools.hasGold or false) 240 - && !targetPlatform.isMusl 241 - ); 242 - 243 - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. 244 - variantSuffix = lib.concatStrings [ 245 - (lib.optionalString stdenv.hostPlatform.isMusl "-musl") 246 - (lib.optionalString enableIntegerSimple "-integer-simple") 247 - ]; 248 - 249 - libffi_name = 250 - if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then "libffi" else "libffi_3_3"; 251 - 252 - # These libraries are library dependencies of the standard libraries bundled 253 - # by GHC (core libs) users will link their compiled artifacts again. Thus, 254 - # they should be taken from targetPackages. 255 - # 256 - # We need to use pkgsHostTarget if we are cross compiling a native GHC compiler, 257 - # though (when native compiling GHC, pkgsHostTarget == targetPackages): 258 - # 259 - # 1. targetPackages would be empty(-ish) in this situation since we can't 260 - # execute cross compiled compilers in order to obtain the libraries 261 - # that would be in targetPackages. 262 - # 2. pkgsHostTarget is fine to use since hostPlatform == targetPlatform in this 263 - # situation. 264 - # 3. The core libs used by the final GHC (stage 2) for user artifacts are also 265 - # used to build stage 2 GHC itself, i.e. the core libs are both host and 266 - # target. 267 - targetLibs = 268 - let 269 - basePackageSet = if hostPlatform != targetPlatform then targetPackages else pkgsHostTarget; 270 - in 271 - { 272 - inherit (basePackageSet) gmp ncurses numactl; 273 - # dynamic inherits are not possible in Nix 274 - libffi = basePackageSet.${libffi_name}; 275 - }; 276 - 277 - in 278 - 279 - stdenv.mkDerivation ( 280 - rec { 281 - inherit version; 282 - pname = "${targetPrefix}ghc${variantSuffix}"; 283 - 284 - src = fetchurl { 285 - url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz"; 286 - sha256 = "e3eef6229ce9908dfe1ea41436befb0455fefb1932559e860ad4c606b0d03c9d"; 287 - }; 288 - 289 - enableParallelBuilding = true; 290 - 291 - outputs = [ 292 - "out" 293 - "doc" 294 - ]; 295 - 296 - patches = [ 297 - # Fix docs build with sphinx >= 6.0 298 - # https://gitlab.haskell.org/ghc/ghc/-/issues/22766 299 - (fetchpatch { 300 - name = "ghc-docs-sphinx-6.0.patch"; 301 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 302 - sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 303 - }) 304 - 305 - # Determine size of time related types using hsc2hs instead of assuming CLong. 306 - # Prevents failures when e.g. stat(2)ing on 32bit systems with 64bit time_t etc. 307 - # https://github.com/haskell/ghcup-hs/issues/1107 308 - # https://gitlab.haskell.org/ghc/ghc/-/issues/25095 309 - # Note that in normal situations this shouldn't be the case since nixpkgs 310 - # doesn't set -D_FILE_OFFSET_BITS=64 and friends (yet). 311 - (fetchpatch { 312 - name = "unix-fix-ctimeval-size-32-bit.patch"; 313 - url = "https://github.com/haskell/unix/commit/8183e05b97ce870dd6582a3677cc82459ae566ec.patch"; 314 - sha256 = "17q5yyigqr5kxlwwzb95sx567ysfxlw6bp3j4ji20lz0947aw6gv"; 315 - stripLen = 1; 316 - extraPrefix = "libraries/unix/"; 317 - }) 318 - 319 - # See upstream patch at 320 - # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4885. Since we build 321 - # from source distributions, the auto-generated configure script needs to be 322 - # patched as well, therefore we use an in-tree patch instead of pulling the 323 - # upstream patch. Don't forget to check backport status of the upstream patch 324 - # when adding new GHC releases in nixpkgs. 325 - ./respect-ar-path.patch 326 - 327 - # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 328 - (fetchpatch { 329 - url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; 330 - sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk="; 331 - extraPrefix = "utils/haddock/"; 332 - stripLen = 1; 333 - }) 334 - 335 - # cabal passes incorrect --host= when cross-compiling 336 - # https://github.com/haskell/cabal/issues/5887 337 - (fetchpatch { 338 - url = "https://raw.githubusercontent.com/input-output-hk/haskell.nix/122bd81150386867da07fdc9ad5096db6719545a/overlays/patches/ghc/cabal-host.patch"; 339 - sha256 = "sha256:0yd0sajgi24sc1w5m55lkg2lp6kfkgpp3lgija2c8y3cmkwfpdc1"; 340 - }) 341 - 342 - # In order to build ghcjs packages, the Cabal of the ghc used for the ghcjs 343 - # needs to be patched. Ref https://github.com/haskell/cabal/pull/7575 344 - (fetchpatch { 345 - url = "https://github.com/haskell/cabal/commit/369c4a0a54ad08a9e6b0d3bd303fedd7b5e5a336.patch"; 346 - sha256 = "120f11hwyaqa0pq9g5l1300crqij49jg0rh83hnp9sa49zfdwx1n"; 347 - stripLen = 3; 348 - extraPrefix = "libraries/Cabal/Cabal/"; 349 - }) 350 - 351 - # We need to be able to set AR_STAGE0 and LD_STAGE0 when cross-compiling 352 - (fetchpatch { 353 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/8f7dd5710b80906ea7a3e15b7bb56a883a49fed8.patch"; 354 - hash = "sha256-C636Nq2U8YOG/av7XQmG3L1rU0bmC9/7m7Hty5pm5+s="; 355 - }) 356 - 357 - # Backport part of <https://gitlab.haskell.org/ghc/ghc/-/merge_requests/7111> to 8.10.7 358 - # The change we are interested in is that Cabal no longer sets include-dirs 359 - # for the GHCi library delegating to the system search path or (in our case) 360 - # cc-wrapper. Without this patch, the target libffi ends up in there (which 361 - # we provide via --with-ffi-includes) which breaks bootstrapping e.g. when 362 - # cross compiling GHC. Without include-dirs, cc-wrapper and splicing will 363 - # correctly pick the suitable libffi out of the build environment. 364 - (fetchpatch { 365 - name = "ghci-no-libffi-include.patch"; 366 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/b2721819f391ab49871271283f32df54810c4387.patch"; 367 - sha256 = "1rmv3132xhxbka97v0rx7r6larx5f5nnvs4mgm9q3rmgpjyd1vf9"; 368 - includes = [ "libraries/ghci/ghci.cabal.in" ]; 369 - }) 370 - 371 - # Correctly record libnuma's library and include directories in the 372 - # package db. This fixes linking whenever stdenv and propagation won't 373 - # quite pass the correct -L flags to the linker, e.g. when using GHC 374 - # outside of stdenv/nixpkgs or build->build compilation in pkgsStatic. 375 - ./ghc-8.10-9.2-rts-package-db-libnuma-dirs.patch 376 - ] 377 - ++ lib.optionals stdenv.hostPlatform.isDarwin [ 378 - # Make Block.h compile with c++ compilers. Remove with the next release 379 - (fetchpatch { 380 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/97d0b0a367e4c6a52a17c3299439ac7de129da24.patch"; 381 - sha256 = "0r4zjj0bv1x1m2dgxp3adsf2xkr94fjnyj1igsivd9ilbs5ja0b5"; 382 - }) 383 - ] 384 - ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 385 - # Prevent the paths module from emitting symbols that we don't use 386 - # when building with separate outputs. 387 - # 388 - # These cause problems as they're not eliminated by GHC's dead code 389 - # elimination on aarch64-darwin. (see 390 - # https://github.com/NixOS/nixpkgs/issues/140774 for details). 391 - ./Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch 392 - ]; 393 - 394 - postPatch = "patchShebangs ."; 395 - 396 - # GHC is a bit confused on its cross terminology. 397 - # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths 398 - preConfigure = '' 399 - for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do 400 - export "''${env#TARGET_}=''${!env}" 401 - done 402 - # Stage0 (build->build) which builds stage 1 403 - export GHC="${bootPkgs.ghc}/bin/ghc" 404 - # GHC is a bit confused on its cross terminology, as these would normally be 405 - # the *host* tools. 406 - export CC="${toolPath "cc" targetCC}" 407 - export CXX="${toolPath "c++" targetCC}" 408 - # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 409 - export LD="${toolPath "ld${lib.optionalString useLdGold ".gold"}" targetCC}" 410 - export AS="${toolPath "as" targetCC}" 411 - export AR="${toolPath "ar" targetCC}" 412 - export NM="${toolPath "nm" targetCC}" 413 - export RANLIB="${toolPath "ranlib" targetCC}" 414 - export READELF="${toolPath "readelf" targetCC}" 415 - export STRIP="${toolPath "strip" targetCC}" 416 - export OBJDUMP="${toolPath "objdump" targetCC}" 417 - '' 418 - + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' 419 - export OTOOL="${toolPath "otool" targetCC}" 420 - export INSTALL_NAME_TOOL="${toolPath "install_name_tool" targetCC}" 421 - '' 422 - + lib.optionalString useLLVM '' 423 - export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" 424 - export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" 425 - '' 426 - + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' 427 - # LLVM backend on Darwin needs clang: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm 428 - # The executable we specify via $CLANG is used as an assembler (exclusively, it seems, but this isn't 429 - # clarified in any user facing documentation). As such, it'll be called on assembly produced by $CC 430 - # which usually comes from the darwin stdenv. To prevent a situation where $CLANG doesn't understand 431 - # the assembly it is given, we need to make sure that it matches the LLVM version of $CC if possible. 432 - # It is unclear (at the time of writing 2024-09-01) whether $CC should match the LLVM version we use 433 - # for llc and opt which would require using a custom darwin stdenv for targetCC. 434 - export CLANG="${ 435 - if targetCC.isClang then 436 - toolPath "clang" targetCC 437 - else 438 - "${buildTargetLlvmPackages.clang}/bin/${buildTargetLlvmPackages.clang.targetPrefix}clang" 439 - }" 440 - '' 441 - + '' 442 - # No need for absolute paths since these tools only need to work during the build 443 - export CC_STAGE0="$CC_FOR_BUILD" 444 - export LD_STAGE0="$LD_FOR_BUILD" 445 - export AR_STAGE0="$AR_FOR_BUILD" 446 - 447 - echo -n "${buildMK}" > mk/build.mk 448 - sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure 449 - '' 450 - + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' 451 - export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}" 452 - '' 453 - + lib.optionalString stdenv.hostPlatform.isDarwin '' 454 - export NIX_LDFLAGS+=" -no_dtrace_dof" 455 - 456 - # GHC tries the host xattr /usr/bin/xattr by default which fails since it expects python to be 2.7 457 - export XATTR=${lib.getBin xattr}/bin/xattr 458 - '' 459 - + lib.optionalString targetPlatform.useAndroidPrebuilt '' 460 - 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 461 - '' 462 - + lib.optionalString targetPlatform.isMusl '' 463 - echo "patching llvm-targets for musl targets..." 464 - echo "Cloning these existing '*-linux-gnu*' targets:" 465 - grep linux-gnu llvm-targets | sed 's/^/ /' 466 - echo "(go go gadget sed)" 467 - sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets 468 - echo "llvm-targets now contains these '*-linux-musl*' targets:" 469 - grep linux-musl llvm-targets | sed 's/^/ /' 470 - 471 - echo "And now patching to preserve '-musleabi' as done with '-gnueabi'" 472 - # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen) 473 - for x in configure aclocal.m4; do 474 - substituteInPlace $x \ 475 - --replace '*-android*|*-gnueabi*)' \ 476 - '*-android*|*-gnueabi*|*-musleabi*)' 477 - done 478 - ''; 479 - 480 - # Although it is usually correct to pass --host, we don't do that here because 481 - # GHC's usage of build, host, and target is non-standard. 482 - # See https://gitlab.haskell.org/ghc/ghc/-/wikis/building/cross-compiling 483 - # TODO(@Ericson2314): Always pass "--target" and always prefix. 484 - configurePlatforms = [ 485 - "build" 486 - ] 487 - ++ lib.optional (buildPlatform != hostPlatform || targetPlatform != hostPlatform) "target"; 488 - 489 - # `--with` flags for libraries needed for RTS linker 490 - configureFlags = [ 491 - "--datadir=$doc/share/doc/ghc" 492 - ] 493 - ++ lib.optionals enableTerminfo [ 494 - "--with-curses-includes=${lib.getDev targetLibs.ncurses}/include" 495 - "--with-curses-libraries=${lib.getLib targetLibs.ncurses}/lib" 496 - ] 497 - ++ lib.optionals (args.${libffi_name} != null) [ 498 - "--with-system-libffi" 499 - "--with-ffi-includes=${targetLibs.libffi.dev}/include" 500 - "--with-ffi-libraries=${targetLibs.libffi.out}/lib" 501 - ] 502 - ++ lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ 503 - "--with-gmp-includes=${targetLibs.gmp.dev}/include" 504 - "--with-gmp-libraries=${targetLibs.gmp.out}/lib" 505 - ] 506 - ++ 507 - lib.optionals 508 - (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) 509 - [ 510 - "--with-iconv-includes=${libiconv}/include" 511 - "--with-iconv-libraries=${libiconv}/lib" 512 - ] 513 - ++ lib.optionals (targetPlatform != hostPlatform) [ 514 - "--enable-bootstrap-with-devel-snapshot" 515 - ] 516 - ++ lib.optionals useLdGold [ 517 - "CFLAGS=-fuse-ld=gold" 518 - "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" 519 - "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" 520 - ] 521 - ++ lib.optionals (disableLargeAddressSpace) [ 522 - "--disable-large-address-space" 523 - ] 524 - ++ lib.optionals enableNuma [ 525 - "--enable-numa" 526 - "--with-libnuma-includes=${lib.getDev targetLibs.numactl}/include" 527 - "--with-libnuma-libraries=${lib.getLib targetLibs.numactl}/lib" 528 - ] 529 - ++ lib.optionals enableUnregisterised [ 530 - "--enable-unregisterised" 531 - ]; 532 - 533 - # Make sure we never relax`$PATH` and hooks support for compatibility. 534 - strictDeps = true; 535 - 536 - # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself. 537 - dontAddExtraLibs = true; 538 - 539 - nativeBuildInputs = [ 540 - perl 541 - autoreconfHook 542 - autoconf 543 - automake 544 - m4 545 - python3 546 - bootPkgs.alex 547 - bootPkgs.happy 548 - bootPkgs.hscolour 549 - bootPkgs.ghc-settings-edit 550 - ] 551 - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ 552 - autoSignDarwinBinariesHook 553 - ] 554 - ++ lib.optionals enableDocs [ 555 - sphinx 556 - ]; 557 - 558 - # Everything the stage0 compiler needs to build stage1: CC, bintools, extra libs. 559 - # See also GHC, {CC,LD,AR}_STAGE0 in preConfigure. 560 - depsBuildBuild = [ 561 - # N.B. We do not declare bootPkgs.ghc in any of the stdenv.mkDerivation 562 - # dependency lists to prevent the bintools setup hook from adding ghc's 563 - # lib directory to the linker flags. Instead we tell configure about it 564 - # via the GHC environment variable. 565 - buildCC 566 - # stage0 builds terminfo unconditionally, so we always need ncurses 567 - ncurses 568 - ]; 569 - # For building runtime libs 570 - depsBuildTarget = toolsForTarget; 571 - 572 - # Prevent stage0 ghc from leaking into the final result. This was an issue 573 - # with GHC 9.6. 574 - disallowedReferences = [ 575 - bootPkgs.ghc 576 - ]; 577 - 578 - buildInputs = [ bash ] ++ (libDeps hostPlatform); 579 - 580 - # stage1 GHC doesn't need to link against libnuma, so it's target specific 581 - depsTargetTarget = map lib.getDev ( 582 - libDeps targetPlatform ++ lib.optionals enableNuma [ targetLibs.numactl ] 583 - ); 584 - depsTargetTargetPropagated = map (lib.getOutput "out") ( 585 - libDeps targetPlatform ++ lib.optionals enableNuma [ targetLibs.numactl ] 586 - ); 587 - 588 - # required, because otherwise all symbols from HSffi.o are stripped, and 589 - # that in turn causes GHCi to abort 590 - stripDebugFlags = [ "-S" ] ++ lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols"; 591 - 592 - checkTarget = "test"; 593 - 594 - # GHC cannot currently produce outputs that are ready for `-pie` linking. 595 - # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. 596 - # See: 597 - # * https://github.com/NixOS/nixpkgs/issues/129247 598 - # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 599 - hardeningDisable = [ 600 - "format" 601 - "pie" 602 - ]; 603 - 604 - # big-parallel allows us to build with more than 2 cores on 605 - # Hydra which already warrants a significant speedup 606 - requiredSystemFeatures = [ "big-parallel" ]; 607 - 608 - postInstall = '' 609 - settingsFile="$out/lib/${targetPrefix}${passthru.haskellCompilerName}/settings" 610 - 611 - # Make the installed GHC use the host->target tools. 612 - ghc-settings-edit "$settingsFile" \ 613 - "C compiler command" "${toolPath "cc" installCC}" \ 614 - "Haskell CPP command" "${toolPath "cc" installCC}" \ 615 - "C++ compiler command" "${toolPath "c++" installCC}" \ 616 - "ld command" "${toolPath "ld${lib.optionalString useLdGold ".gold"}" installCC}" \ 617 - "Merge objects command" "${toolPath "ld${lib.optionalString useLdGold ".gold"}" installCC}" \ 618 - "ar command" "${toolPath "ar" installCC}" \ 619 - "ranlib command" "${toolPath "ranlib" installCC}" 620 - '' 621 - + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' 622 - ghc-settings-edit "$settingsFile" \ 623 - "otool command" "${toolPath "otool" installCC}" \ 624 - "install_name_tool command" "${toolPath "install_name_tool" installCC}" 625 - '' 626 - + lib.optionalString useLLVM '' 627 - ghc-settings-edit "$settingsFile" \ 628 - "LLVM llc command" "${lib.getBin llvmPackages.llvm}/bin/llc" \ 629 - "LLVM opt command" "${lib.getBin llvmPackages.llvm}/bin/opt" 630 - '' 631 - + lib.optionalString (useLLVM && stdenv.targetPlatform.isDarwin) '' 632 - ghc-settings-edit "$settingsFile" \ 633 - "LLVM clang command" "${ 634 - # See comment for CLANG in preConfigure 635 - if installCC.isClang then 636 - toolPath "clang" installCC 637 - else 638 - "${llvmPackages.clang}/bin/${llvmPackages.clang.targetPrefix}clang" 639 - }" 640 - '' 641 - + '' 642 - 643 - # Install the bash completion file. 644 - install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc 645 - ''; 646 - 647 - passthru = { 648 - inherit bootPkgs targetPrefix; 649 - 650 - inherit llvmPackages; 651 - inherit enableShared; 652 - 653 - # This is used by the haskell builder to query 654 - # the presence of the haddock program. 655 - hasHaddock = enableHaddockProgram; 656 - 657 - # Our Cabal compiler name 658 - haskellCompilerName = "ghc-${version}"; 659 - 660 - bootstrapAvailable = lib.meta.availableOn stdenv.buildPlatform bootPkgs.ghc; 661 - }; 662 - 663 - meta = { 664 - homepage = "http://haskell.org/ghc"; 665 - description = "Glasgow Haskell Compiler"; 666 - maintainers = with lib.maintainers; [ 667 - guibou 668 - ]; 669 - teams = [ lib.teams.haskell ]; 670 - timeout = 24 * 3600; 671 - platforms = lib.platforms.all; 672 - inherit (bootPkgs.ghc.meta) license; 673 - }; 674 - 675 - } 676 - // lib.optionalAttrs targetPlatform.useAndroidPrebuilt { 677 - dontStrip = true; 678 - dontPatchELF = true; 679 - noAuditTmpdir = true; 680 - } 681 - )
-4
pkgs/development/compilers/ghc/9.2.8.nix
··· 1 - import ./common-make-native-bignum.nix { 2 - version = "9.2.8"; 3 - sha256 = "sha256-XxPReGv0/RL0tF+qN6vttbs/NtXlj32lMH6L/oilZ6E="; 4 - }
-99
pkgs/development/compilers/ghc/Cabal-3.2-3.4-paths-fix-cycle-aarch64-darwin.patch
··· 1 - diff --git a/Cabal/Distribution/Simple/Build/PathsModule.hs b/Cabal/Distribution/Simple/Build/PathsModule.hs 2 - index 5e660e8d6..1ae603c94 100644 3 - --- a/libraries/Cabal/Cabal/Distribution/Simple/Build/PathsModule.hs 4 - +++ b/libraries/Cabal/Cabal/Distribution/Simple/Build/PathsModule.hs 5 - @@ -37,6 +37,9 @@ import System.FilePath ( pathSeparator ) 6 - -- * Building Paths_<pkg>.hs 7 - -- ------------------------------------------------------------ 8 - 9 - +splitPath :: FilePath -> [ String ] 10 - +splitPath = unintersperse pathSeparator 11 - + 12 - generatePathsModule :: PackageDescription -> LocalBuildInfo -> ComponentLocalBuildInfo -> String 13 - generatePathsModule pkg_descr lbi clbi = 14 - let pragmas = 15 - @@ -78,12 +81,44 @@ generatePathsModule pkg_descr lbi clbi = 16 - "import System.Environment (getExecutablePath)\n" 17 - | otherwise = "" 18 - 19 - + dirs = [ (flat_libdir, "LibDir") 20 - + , (flat_dynlibdir, "DynLibDir") 21 - + , (flat_datadir, "DataDir") 22 - + , (flat_libexecdir, "LibexecDir") 23 - + , (flat_sysconfdir, "SysconfDir") ]; 24 - + 25 - + shouldEmitPath p 26 - + | (splitPath flat_prefix) `isPrefixOf` (splitPath flat_bindir) = True 27 - + | (splitPath flat_prefix) `isPrefixOf` (splitPath p) = False 28 - + | otherwise = True 29 - + 30 - + shouldEmitDataDir = shouldEmitPath flat_datadir 31 - + 32 - + nixEmitPathFn (path, name) = let 33 - + varName = toLower <$> name 34 - + fnName = "get"++name 35 - + in if shouldEmitPath path then 36 - + varName ++ " :: FilePath\n"++ 37 - + varName ++ " = " ++ show path ++ 38 - + "\n" ++ fnName ++ " :: IO FilePath" ++ 39 - + "\n" ++ fnName ++ " = " ++ mkGetEnvOr varName ("return " ++ varName)++"\n" 40 - + else "" 41 - + 42 - + absBody = intercalate "\n" $ nixEmitPathFn <$> dirs 43 - + 44 - + warnPragma = case filter (not . shouldEmitPath . fst) dirs of 45 - + [] -> "" 46 - + omittedDirs -> "{-# WARNING \"The functions: "++omittedFns++" Have been omitted by the Nix build system.\" #-}" 47 - + where omittedFns = intercalate ", " $ map snd omittedDirs 48 - + 49 - + importList = intercalate ", " $ ("get" ++) . snd <$> filter (shouldEmitPath . fst) dirs 50 - + 51 - header = 52 - pragmas++ 53 - - "module " ++ prettyShow paths_modulename ++ " (\n"++ 54 - - " version,\n"++ 55 - - " getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,\n"++ 56 - - " getDataFileName, getSysconfDir\n"++ 57 - + "module " ++ prettyShow paths_modulename ++ " " ++ warnPragma ++ " (\n"++ 58 - + " version, getBinDir,\n"++ 59 - + (if shouldEmitDataDir then " getDataFileName, \n" else "\n")++ 60 - + " " ++ importList ++"\n"++ 61 - " ) where\n"++ 62 - "\n"++ 63 - foreign_imports++ 64 - @@ -136,26 +171,18 @@ generatePathsModule pkg_descr lbi clbi = 65 - "\n"++ 66 - filename_stuff 67 - | absolute = 68 - - "\nbindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath\n"++ 69 - + "\nbindir :: FilePath\n"++ 70 - "\nbindir = " ++ show flat_bindir ++ 71 - - "\nlibdir = " ++ show flat_libdir ++ 72 - - "\ndynlibdir = " ++ show flat_dynlibdir ++ 73 - - "\ndatadir = " ++ show flat_datadir ++ 74 - - "\nlibexecdir = " ++ show flat_libexecdir ++ 75 - - "\nsysconfdir = " ++ show flat_sysconfdir ++ 76 - "\n"++ 77 - - "\ngetBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath\n"++ 78 - + "\ngetBinDir :: IO FilePath\n"++ 79 - "getBinDir = "++mkGetEnvOr "bindir" "return bindir"++"\n"++ 80 - - "getLibDir = "++mkGetEnvOr "libdir" "return libdir"++"\n"++ 81 - - "getDynLibDir = "++mkGetEnvOr "dynlibdir" "return dynlibdir"++"\n"++ 82 - - "getDataDir = "++mkGetEnvOr "datadir" "return datadir"++"\n"++ 83 - - "getLibexecDir = "++mkGetEnvOr "libexecdir" "return libexecdir"++"\n"++ 84 - - "getSysconfDir = "++mkGetEnvOr "sysconfdir" "return sysconfdir"++"\n"++ 85 - - "\n"++ 86 - - "getDataFileName :: FilePath -> IO FilePath\n"++ 87 - - "getDataFileName name = do\n"++ 88 - - " dir <- getDataDir\n"++ 89 - - " return (dir ++ "++path_sep++" ++ name)\n" 90 - + absBody ++ "\n"++ 91 - + (if shouldEmitDataDir then 92 - + "getDataFileName :: FilePath -> IO FilePath\n"++ 93 - + "getDataFileName name = do\n"++ 94 - + " dir <- getDataDir\n"++ 95 - + " return (dir ++ "++path_sep++" ++ name)\n" 96 - + else "\n") 97 - | otherwise = 98 - "\nprefix, bindirrel :: FilePath" ++ 99 - "\nprefix = " ++ show flat_prefix ++
+16 -57
pkgs/development/compilers/ghc/common-make-native-bignum.nix
··· 309 309 # package db. This fixes linking whenever stdenv and propagation won't 310 310 # quite pass the correct -L flags to the linker, e.g. when using GHC 311 311 # outside of stdenv/nixpkgs or build->build compilation in pkgsStatic. 312 - ( 313 - if lib.versionAtLeast version "9.4" then 314 - ./ghc-9.4-rts-package-db-libnuma-dirs.patch 315 - else 316 - ./ghc-8.10-9.2-rts-package-db-libnuma-dirs.patch 317 - ) 312 + ./ghc-9.4-rts-package-db-libnuma-dirs.patch 318 313 ] 319 314 320 315 # Before GHC 9.6, GHC, when used to compile C sources (i.e. to drive the CC), would first ··· 333 328 # 334 329 # https://gitlab.haskell.org/ghc/ghc/-/issues/25608#note_622589 335 330 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6877 336 - ++ ( 337 - if lib.versionAtLeast version "9.4" then 338 - [ 339 - # Need to use this patch so the next one applies, passes file location info to the cc phase 340 - (fetchpatch { 341 - name = "ghc-add-location-to-cc-phase.patch"; 342 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/4a7256a75af2fc0318bef771a06949ffb3939d5a.patch"; 343 - hash = "sha256-DnTI+i1zMebeWvw75D59vMaEEBb2Nr9HusxTyhmdy2M="; 344 - }) 345 - # Makes Cc phase directly generate object files instead of assembly 346 - (fetchpatch { 347 - name = "ghc-cc-directly-emit-object.patch"; 348 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/96811ba491495b601ec7d6a32bef8563b0292109.patch"; 349 - hash = "sha256-G8u7/MK/tGOEN8Wxccxj/YIOP7mL2G9Co1WKdHXOo6I="; 350 - }) 351 - ] 352 - else 353 - [ 354 - # TODO(@sternenseemann): backport changes to GHC < 9.4 if possible 355 - ] 356 - ) 331 + ++ [ 332 + # Need to use this patch so the next one applies, passes file location info to the cc phase 333 + (fetchpatch { 334 + name = "ghc-add-location-to-cc-phase.patch"; 335 + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/4a7256a75af2fc0318bef771a06949ffb3939d5a.patch"; 336 + hash = "sha256-DnTI+i1zMebeWvw75D59vMaEEBb2Nr9HusxTyhmdy2M="; 337 + }) 338 + # Makes Cc phase directly generate object files instead of assembly 339 + (fetchpatch { 340 + name = "ghc-cc-directly-emit-object.patch"; 341 + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/96811ba491495b601ec7d6a32bef8563b0292109.patch"; 342 + hash = "sha256-G8u7/MK/tGOEN8Wxccxj/YIOP7mL2G9Co1WKdHXOo6I="; 343 + }) 344 + ] 357 345 358 346 ++ [ 359 347 # Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs ··· 366 354 }) 367 355 ] 368 356 369 - # fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482 370 - ++ lib.optionals (lib.versionOlder version "9.4") [ 371 - (fetchpatch { 372 - url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch"; 373 - sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk="; 374 - extraPrefix = "utils/haddock/"; 375 - stripLen = 1; 376 - }) 377 - ] 378 - 379 357 # Fixes stack overrun in rts which crashes an process whenever 380 358 # freeHaskellFunPtr is called with nixpkgs' hardening flags. 381 359 # https://gitlab.haskell.org/ghc/ghc/-/issues/25485 382 360 # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13599 383 361 # TODO: patch doesn't apply for < 9.4, but may still be necessary? 384 - ++ lib.optionals (lib.versionAtLeast version "9.4") [ 362 + ++ [ 385 363 (fetchpatch { 386 364 name = "ghc-rts-adjustor-fix-i386-stack-overrun.patch"; 387 365 url = "https://gitlab.haskell.org/ghc/ghc/-/commit/39bb6e583d64738db51441a556d499aa93a4fc4a.patch"; ··· 389 367 }) 390 368 ] 391 369 392 - ++ lib.optionals (lib.versionOlder version "9.4.6") [ 393 - # Fix docs build with sphinx >= 6.0 394 - # https://gitlab.haskell.org/ghc/ghc/-/issues/22766 395 - (fetchpatch { 396 - name = "ghc-docs-sphinx-6.0.patch"; 397 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch"; 398 - sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv"; 399 - }) 400 - ] 401 - 402 370 ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ 403 371 # Prevent the paths module from emitting symbols that we don't use 404 372 # when building with separate outputs. ··· 466 434 export AR_STAGE0="$AR_FOR_BUILD" 467 435 468 436 echo -n "${buildMK}" > mk/build.mk 469 - '' 470 - + lib.optionalString (lib.versionAtLeast version "9.4") '' 471 437 sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure 472 438 '' 473 439 + lib.optionalString (stdenv.hostPlatform.isLinux && hostPlatform.libc == "glibc") '' ··· 503 469 --replace '*-android*|*-gnueabi*)' \ 504 470 '*-android*|*-gnueabi*|*-musleabi*)' 505 471 done 506 - '' 507 - # HACK: allow bootstrapping with GHC 8.10 which works fine, as we don't have 508 - # binary 9.0 packaged. Bootstrapping with 9.2 is broken without hadrian. 509 - + lib.optionalString (lib.versions.majorMinor version == "9.4") '' 510 - substituteInPlace configure --replace \ 511 - 'MinBootGhcVersion="9.0"' \ 512 - 'MinBootGhcVersion="8.10"' 513 472 ''; 514 473 515 474 # Although it is usually correct to pass --host, we don't do that here because
-100
pkgs/development/compilers/ghc/ghc-8.10-9.2-rts-package-db-libnuma-dirs.patch
··· 1 - From 3d17e6fa39fb18d4300fbf2a0c4b9ddb4adf746b Mon Sep 17 00:00:00 2001 2 - From: sterni <sternenseemann@systemli.org> 3 - Date: Thu, 17 Jul 2025 21:21:29 +0200 4 - Subject: [PATCH] rts: record libnuma include and lib dirs in package conf 5 - MIME-Version: 1.0 6 - Content-Type: text/plain; charset=UTF-8 7 - Content-Transfer-Encoding: 8bit 8 - 9 - The --with-libnuma-libraries and --with-libnuma-includes flags were 10 - originally introduced for hadrian in def486c90ef6f37d81d0d9c6df7544 11 - and curiously never supported by the make build system — even though 12 - the addition was made in the 9.0 series and even backported to the 13 - 8.10 series. 14 - 15 - While the make build system knows when to link against libnuma, it won't 16 - enforce its specific directories by adding them to rts.conf in the 17 - package db. This commit implements this retroactively for the make build 18 - system, modeled after how make does the same sort of thing for Libdw. 19 - The Libdw logic also affects the bindist configure file in 20 - distrib/configure.ac which isn't replicate since we don't need it. 21 - --- 22 - mk/config.mk.in | 4 ++++ 23 - rts/ghc.mk | 8 ++++++++ 24 - rts/package.conf.in | 5 +++-- 25 - rts/rts.cabal.in | 1 + 26 - 4 files changed, 16 insertions(+), 2 deletions(-) 27 - 28 - diff --git a/mk/config.mk.in b/mk/config.mk.in 29 - index 35f6e2d087..d2b1329eb5 100644 30 - --- a/mk/config.mk.in 31 - +++ b/mk/config.mk.in 32 - @@ -333,6 +333,10 @@ LibdwIncludeDir=@LibdwIncludeDir@ 33 - # rts/Libdw.c:set_initial_registers() 34 - GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 s390x),@UseLibdw@,NO)) 35 - 36 - +UseLibNuma=@UseLibNuma@ 37 - +LibNumaLibDir=@LibNumaLibDir@ 38 - +LibNumaIncludeDir=@LibNumaIncludeDir@ 39 - + 40 - ################################################################################ 41 - # 42 - # Paths (see paths.mk) 43 - diff --git a/rts/ghc.mk b/rts/ghc.mk 44 - index 9c535def5a..7782c4b768 100644 45 - --- a/rts/ghc.mk 46 - +++ b/rts/ghc.mk 47 - @@ -576,6 +576,14 @@ rts_PACKAGE_CPP_OPTS += -DLIBDW_INCLUDE_DIR= 48 - rts_PACKAGE_CPP_OPTS += -DLIBDW_LIB_DIR= 49 - endif 50 - 51 - +ifeq "$(UseLibNuma)" "YES" 52 - +rts_PACKAGE_CPP_OPTS += -DLIBNUMA_INCLUDE_DIR=$(LibNumaIncludeDir) 53 - +rts_PACKAGE_CPP_OPTS += -DLIBNUMA_LIB_DIR=$(LibNumaLibDir) 54 - +else 55 - +rts_PACKAGE_CPP_OPTS += -DLIBNUMA_INCLUDE_DIR= 56 - +rts_PACKAGE_CPP_OPTS += -DLIBNUMA_LIB_DIR= 57 - +endif 58 - + 59 - # ----------------------------------------------------------------------------- 60 - # dependencies 61 - 62 - diff --git a/rts/package.conf.in b/rts/package.conf.in 63 - index 9bdbf3659a..46f728b09a 100644 64 - --- a/rts/package.conf.in 65 - +++ b/rts/package.conf.in 66 - @@ -18,9 +18,9 @@ hidden-modules: 67 - import-dirs: 68 - 69 - #if defined(INSTALLING) 70 - -library-dirs: LIB_DIR"/rts" FFI_LIB_DIR LIBDW_LIB_DIR 71 - +library-dirs: LIB_DIR"/rts" FFI_LIB_DIR LIBDW_LIB_DIR LIBNUMA_LIB_DIR 72 - #else /* !INSTALLING */ 73 - -library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR 74 - +library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR LIBNUMA_LIB_DIR 75 - #endif 76 - 77 - hs-libraries: "HSrts" FFI_LIB 78 - @@ -76,6 +76,7 @@ include-dirs: TOP"/rts/dist/build" 79 - FFI_INCLUDE_DIR 80 - LIBDW_INCLUDE_DIR 81 - TOP"/includes/dist-install/build" 82 - + LIBNUMA_INCLUDE_DIR 83 - #endif 84 - 85 - includes: Stg.h 86 - diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in 87 - index 0a06414d95..f71fb079ec 100644 88 - --- a/rts/rts.cabal.in 89 - +++ b/rts/rts.cabal.in 90 - @@ -150,6 +150,7 @@ library 91 - include-dirs: build ../includes includes 92 - includes/dist-derivedconstants/header @FFIIncludeDir@ 93 - @LibdwIncludeDir@ 94 - + @LibNumaIncludeDir@ 95 - includes: Stg.h 96 - install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h 97 - ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h 98 - -- 99 - 2.50.0 100 -
-27
pkgs/development/haskell-modules/configuration-common.nix
··· 1971 1971 # https://github.com/serokell/haskell-crypto/issues/25 1972 1972 crypto-sodium = dontCheck super.crypto-sodium; 1973 1973 1974 - # Polyfill for GHCs from the integer-simple days that don't bundle ghc-bignum 1975 - ghc-bignum = super.ghc-bignum or self.mkDerivation { 1976 - pname = "ghc-bignum"; 1977 - version = "1.0"; 1978 - sha256 = "0xl848q8z6qx2bi6xil0d35lra7wshwvysyfblki659d7272b1im"; 1979 - description = "GHC BigNum library"; 1980 - license = lib.licenses.bsd3; 1981 - # ghc-bignum is not buildable if none of the three backends 1982 - # is explicitly enabled. We enable Native for now as it doesn't 1983 - # depend on anything else as opposed to GMP and FFI. 1984 - # Apply patch which fixes a compilation failure we encountered. 1985 - # Will need to be kept until we can drop ghc-bignum entirely, 1986 - # i. e. if GHC 8.10.* and 8.8.* have been removed. 1987 - configureFlags = [ 1988 - "-f" 1989 - "Native" 1990 - ]; 1991 - patches = [ 1992 - (fetchpatch { 1993 - url = "https://gitlab.haskell.org/ghc/ghc/-/commit/08d1588bf38d83140a86817a7a615db486357d4f.patch"; 1994 - sha256 = "sha256-Y9WW0KDQ/qY2L9ObPvh1i/6lxXIlprbxzdSBDfiaMtE="; 1995 - relative = "libraries/ghc-bignum"; 1996 - }) 1997 - ]; 1998 - }; 1999 - 2000 1974 # 2021-04-09: too strict time bound 2001 1975 # PR pending https://github.com/zohl/cereal-time/pull/2 2002 1976 cereal-time = doJailbreak super.cereal-time; ··· 2615 2589 # 2025-02-06: Allow tasty-quickcheck == 0.11.* 2616 2590 # https://github.com/google/ghc-source-gen/issues/120 2617 2591 ghc-source-gen = doJailbreak super.ghc-source-gen; 2618 - ghc-source-gen_0_4_5_0 = doJailbreak super.ghc-source-gen_0_4_5_0; 2619 2592 # https://github.com/byteverse/bytebuild/issues/20#issuecomment-2652113837 2620 2593 bytebuild = doJailbreak super.bytebuild; 2621 2594 # https://github.com/haskellari/lattices/issues/132
-230
pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix
··· 1 - { pkgs, haskellLib }: 2 - 3 - with haskellLib; 4 - 5 - let 6 - inherit (pkgs.stdenv.hostPlatform) isDarwin; 7 - inherit (pkgs) lib; 8 - in 9 - 10 - self: super: { 11 - llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; 12 - 13 - # Disable GHC 8.10.x core libraries. 14 - array = null; 15 - base = null; 16 - binary = null; 17 - bytestring = null; 18 - Cabal = null; 19 - containers = null; 20 - deepseq = null; 21 - directory = null; 22 - exceptions = null; 23 - filepath = null; 24 - ghc-boot = null; 25 - ghc-boot-th = null; 26 - ghc-compact = null; 27 - ghc-heap = null; 28 - ghc-prim = null; 29 - ghci = null; 30 - haskeline = null; 31 - hpc = null; 32 - integer-gmp = null; 33 - libiserv = null; 34 - mtl = null; 35 - parsec = null; 36 - pretty = null; 37 - process = null; 38 - rts = null; 39 - stm = null; 40 - template-haskell = null; 41 - # GHC only builds terminfo if it is a native compiler 42 - terminfo = 43 - if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then 44 - null 45 - else 46 - doDistribute self.terminfo_0_4_1_7; 47 - text = null; 48 - time = null; 49 - transformers = null; 50 - unix = null; 51 - # GHC only bundles the xhtml library if haddock is enabled, check if this is 52 - # still the case when updating: https://gitlab.haskell.org/ghc/ghc/-/blob/0198841877f6f04269d6050892b98b5c3807ce4c/ghc.mk#L463 53 - xhtml = if self.ghc.hasHaddock or true then null else doDistribute self.xhtml_3000_4_0_0; 54 - 55 - # Need the Cabal-syntax-3.6.0.0 fake package for Cabal < 3.8 to allow callPackage and the constraint solver to work 56 - Cabal-syntax = self.Cabal-syntax_3_6_0_0; 57 - # These core package only exist for GHC >= 9.4. The best we can do is feign 58 - # their existence to callPackages, but their is no shim for lower GHC versions. 59 - system-cxx-std-lib = null; 60 - 61 - # Becomes a core package in GHC >= 9.8 62 - semaphore-compat = doDistribute self.semaphore-compat_1_0_0; 63 - 64 - # only broken for >= 9.6 65 - calligraphy = doDistribute (unmarkBroken super.calligraphy); 66 - 67 - # Only required for ghc >= 9.2 68 - nothunks = super.nothunks.override { 69 - wherefrom-compat = null; 70 - }; 71 - 72 - # Tests require nothunks < 0.3 (conflicting with Stackage) for GHC < 9.8 73 - aeson = dontCheck super.aeson; 74 - 75 - # For GHC < 9.4, some packages need data-array-byte as an extra dependency 76 - # For GHC < 9.2, os-string is not required. 77 - primitive = addBuildDepends [ self.data-array-byte ] super.primitive; 78 - hashable = 79 - addBuildDepends 80 - [ 81 - self.data-array-byte 82 - self.base-orphans 83 - ] 84 - ( 85 - super.hashable.override { 86 - os-string = null; 87 - } 88 - ); 89 - hashable-time = doDistribute (unmarkBroken super.hashable-time); 90 - 91 - # Needs base-orphans for GHC < 9.8 / base < 4.19 92 - some = addBuildDepend self.base-orphans super.some; 93 - 94 - # Too strict lower bounds on base 95 - primitive-addr = doJailbreak super.primitive-addr; 96 - 97 - # Pick right versions for GHC-specific packages 98 - ghc-api-compat = doDistribute (unmarkBroken self.ghc-api-compat_8_10_7); 99 - 100 - # Needs to use ghc-lib due to incompatible GHC 101 - ghc-tags = doDistribute self.ghc-tags_1_5; 102 - 103 - # Jailbreak to fix the build. 104 - base-noprelude = doJailbreak super.base-noprelude; 105 - unliftio-core = doJailbreak super.unliftio-core; 106 - 107 - # Jailbreak to fix the build. 108 - brick = doJailbreak super.brick; 109 - exact-pi = doJailbreak super.exact-pi; 110 - serialise = doJailbreak super.serialise; 111 - setlocale = doJailbreak super.setlocale; 112 - shellmet = doJailbreak super.shellmet; 113 - shower = doJailbreak super.shower; 114 - 115 - # hnix 0.9.0 does not provide an executable for ghc < 8.10, so define completions here for now. 116 - hnix = self.generateOptparseApplicativeCompletions [ "hnix" ] ( 117 - overrideCabal (drv: { 118 - # executable is allowed for ghc >= 8.10 and needs repline 119 - executableHaskellDepends = drv.executableToolDepends or [ ] ++ [ self.repline ]; 120 - }) super.hnix 121 - ); 122 - 123 - haskell-language-server = throw "haskell-language-server dropped support for ghc 8.10 in version 2.3.0.0 please use a newer ghc version or an older nixpkgs version"; 124 - 125 - ghc-lib-parser = doDistribute self.ghc-lib-parser_9_2_8_20230729; 126 - ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_2_1_1; 127 - ghc-lib = doDistribute self.ghc-lib_9_2_8_20230729; 128 - 129 - path-io = doJailbreak super.path-io; 130 - 131 - hlint = self.hlint_3_4_1; 132 - 133 - # test suite depends on vcr since hpack >= 0.38.1 which requires GHC2021 134 - hpack_0_38_1 = dontCheck super.hpack_0_38_1; 135 - 136 - mime-string = disableOptimization super.mime-string; 137 - 138 - # weeder 2.3.* no longer supports GHC 8.10 139 - weeder = doDistribute (doJailbreak self.weeder_2_2_0); 140 - # Unnecessarily strict upper bound on lens 141 - weeder_2_2_0 = doJailbreak ( 142 - super.weeder_2_2_0.override { 143 - # weeder < 2.6 only supports algebraic-graphs < 0.7 144 - # We no longer have matching test deps for algebraic-graphs 0.6.1 in the set 145 - algebraic-graphs = dontCheck self.algebraic-graphs_0_6_1; 146 - } 147 - ); 148 - 149 - # Uses haddock placement that isn't supported by the versions of haddock 150 - # bundled with GHC < 9.0. 151 - wai-extra = dontHaddock super.wai-extra; 152 - 153 - # tar > 0.6 requires os-string which can't be built with bytestring < 0.11 154 - tar = overrideCabal (drv: { 155 - jailbreak = true; 156 - buildDepends = drv.buildDepends or [ ] ++ [ 157 - self.bytestring-handle 158 - ]; 159 - }) self.tar_0_6_0_0; 160 - # text-metrics >= 0.3.3 requires GHC2021 161 - text-metrics = doDistribute (doJailbreak self.text-metrics_0_3_2); 162 - bytestring-handle = unmarkBroken (doDistribute super.bytestring-handle); 163 - 164 - # Doesn't build with 9.0, see https://github.com/yi-editor/yi/issues/1125 165 - yi-core = doDistribute (markUnbroken super.yi-core); 166 - 167 - # Temporarily disabled blaze-textual for GHC >= 9.0 causing hackage2nix ignoring it 168 - # https://github.com/paul-rouse/mysql-simple/blob/872604f87044ff6d1a240d9819a16c2bdf4ed8f5/Database/MySQL/Internal/Blaze.hs#L4-L10 169 - mysql-simple = addBuildDepends [ 170 - self.blaze-textual 171 - ] super.mysql-simple; 172 - 173 - taffybar = markUnbroken (doDistribute super.taffybar); 174 - 175 - # https://github.com/fpco/inline-c/issues/127 (recommend to upgrade to Nixpkgs GHC >=9.0) 176 - inline-c-cpp = (if isDarwin then dontCheck else x: x) super.inline-c-cpp; 177 - 178 - # Depends on OneTuple for GHC < 9.0 179 - universe-base = addBuildDepends [ self.OneTuple ] super.universe-base; 180 - 181 - # Not possible to build in the main GHC 9.0 package set 182 - # https://github.com/awakesecurity/spectacle/issues/49 183 - spectacle = doDistribute (markUnbroken super.spectacle); 184 - 185 - # doctest-parallel dependency requires newer Cabal 186 - regex-tdfa = dontCheck super.regex-tdfa; 187 - 188 - # Unnecessarily strict lower bound on base 189 - # https://github.com/mrkkrp/megaparsec/pull/485#issuecomment-1250051823 190 - megaparsec = doJailbreak super.megaparsec; 191 - 192 - retrie = dontCheck self.retrie_1_1_0_0; 193 - 194 - # Later versions only support GHC >= 9.2 195 - ghc-exactprint = self.ghc-exactprint_0_6_4; 196 - 197 - apply-refact = self.apply-refact_0_9_3_0; 198 - 199 - # Needs OneTuple for ghc < 9.2 200 - binary-orphans = addBuildDepends [ self.OneTuple ] super.binary-orphans; 201 - 202 - # 0.4.6.0 only supports >= 9.0 203 - ghc-source-gen = doDistribute self.ghc-source-gen_0_4_5_0; 204 - 205 - # No instance for (Show B.Builder) arising from a use of ‘print’ 206 - http-types = dontCheck super.http-types; 207 - 208 - # Packages which need compat library for GHC < 9.6 209 - inherit (lib.mapAttrs (_: addBuildDepends [ self.foldable1-classes-compat ]) super) 210 - indexed-traversable 211 - these 212 - ; 213 - base-compat-batteries = addBuildDepends [ 214 - self.foldable1-classes-compat 215 - self.OneTuple 216 - ] super.base-compat-batteries; 217 - 218 - # OneTuple needs hashable (instead of ghc-prim) and foldable1-classes-compat for GHC < 9 219 - OneTuple = 220 - addBuildDepends 221 - [ 222 - self.foldable1-classes-compat 223 - self.base-orphans 224 - ] 225 - ( 226 - super.OneTuple.override { 227 - ghc-prim = self.hashable; 228 - } 229 - ); 230 - }
-8
pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml
··· 29 29 # 2024-12-23: last version to be compatible with Stackage LTS 22/23 (due to data-default) 30 30 - diagrams-input < 0.1.4 31 31 - extensions < 0.1.0.2 # Incompatible with Cabal < 3.12, the newest extensions version is only needed on ghc 9.10 32 - # 2021-11-09: ghc-bignum is bundled starting with 9.0.1; only 1.0 builds with GHCs prior to 9.2.1 33 - - ghc-bignum == 1.0 34 32 # 2025-07-26: HLS doesn't support hiedb >= 0.7 yet 35 33 - hiedb < 0.7 36 34 # 2024-08-17: Stackage doesn't contain hnix-store-core >= 0.8 yet, so we need to restrict hnix-store-remote ··· 48 46 - algebraic-graphs < 0.7 # 2023-08-14: Needed for building weeder < 2.6.0 49 47 - ansi-wl-pprint >= 0.6 && < 0.7 # 2025-07-07: used by gren <= 0.5.4 50 48 - attoparsec == 0.13.* # 2022-02-23: Needed to compile elm for now 51 - - Cabal == 3.2.* # Used for packages needing newer Cabal on ghc 8.6 and 8.8 52 49 - Cabal == 3.10.* 53 50 - Cabal == 3.12.* # version required for cabal-install and other packages 54 51 - Cabal-syntax == 3.6.* # Dummy package that ensures packages depending on Cabal-syntax can work for Cabal < 3.8 ··· 61 58 - fourmolu == 0.16.0.0 # 2025-01-27: for ghc 9.10 compat 62 59 - fsnotify < 0.4 # 2024-04-22: required by spago-0.21 63 60 - fuzzyset == 0.2.4 # 2023-12-20: Needed for building postgrest > 10 64 - - ghc-api-compat == 8.10.7 # 2022-02-17: preserve for GHC 8.10.7 65 61 - ghc-exactprint == 0.6.* # 2022-12-12: needed for GHC < 9.2 66 62 - ghc-exactprint == 1.5.* # 2023-03-30: needed for GHC == 9.2 67 63 - ghc-exactprint == 1.6.* # 2023-03-30: needed for GHC == 9.4 ··· 77 73 - ghc-lib-parser-ex == 9.2.* # 2022-07-13: preserve for GHC 8.10, 9.0 78 74 - ghc-lib-parser-ex == 9.6.* # 2024-05-19: preserve for GHC 9.2, 9.4 79 75 - ghc-lib-parser-ex == 9.10.* # 2024-12-26: preserve for 9.10 HLS 80 - - ghc-source-gen < 0.4.6.0 # 2024-12-31: support GHC < 9.0 81 76 - ghc-tags == 1.5.* # 2023-02-18: preserve for ghc-lib == 9.2.* 82 77 - ghc-tags == 1.7.* # 2023-02-18: preserve for ghc-lib == 9.6.* 83 78 - ghc-tags == 1.8.* # 2023-02-18: preserve for ghc-lib == 9.8.* ··· 88 83 - hasql-notifications < 0.2.3 # 2025-01-19: Needed for building postgrest 89 84 - hasql-pool < 1.1 # 2025-01-19: Needed for building postgrest 90 85 - hasql-transaction < 1.1.1 # 2025-01-19: Needed for building postgrest 91 - - hlint == 3.4.1 # 2022-09-21: preserve for ghc 8.10 92 86 - hlint == 3.6.* # 2025-04-14: needed for hls with ghc-lib-parser 9.6 93 87 - hnix-store-core < 0.7 # 2023-12-11: required by hnix-store-remote 0.6 94 88 - hspec-megaparsec == 2.2.0 # 2023-11-18: Latest version compatible with ghc 9.0 ··· 110 104 - stylish-haskell == 0.14.5.0 # 2025-04-14: needed for hls with ghc-lib 9.6 111 105 - stylish-haskell == 0.15.0.1 # 2025-04-14: needed for hls with ghc-lib 9.10 112 106 - tar == 0.6.0.0 # 2025-02-08: last version to not require os-string (which can't be built with GHC < 9.2) 113 - - text == 2.0.2 # 2023-09-14: Needed for elm (which is currently on ghc-8.10) 114 107 - text-metrics < 0.3.3 # 2025-02-08: >= 0.3.3 uses GHC2021 115 108 - versions < 6 # 2024-04-22: required by spago-0.21 116 - - weeder == 2.2.* # 2022-02-21: preserve for GHC 8.10.7 117 109 - weeder == 2.3.* # 2022-05-31: preserve for GHC 9.0.2 118 110 - weeder == 2.4.* # 2023-02-02: preserve for GHC 9.2.* 119 111 # keep-sorted end
+1 -363
pkgs/development/haskell-modules/hackage-packages.nix
··· 5776 5776 opencv_video = null; 5777 5777 }; 5778 5778 5779 - "Cabal_3_2_1_0" = callPackage ( 5780 - { 5781 - mkDerivation, 5782 - array, 5783 - base, 5784 - base-compat, 5785 - base-orphans, 5786 - binary, 5787 - bytestring, 5788 - containers, 5789 - deepseq, 5790 - Diff, 5791 - directory, 5792 - filepath, 5793 - integer-logarithms, 5794 - mtl, 5795 - optparse-applicative, 5796 - parsec, 5797 - pretty, 5798 - process, 5799 - QuickCheck, 5800 - stm, 5801 - tagged, 5802 - tar, 5803 - tasty, 5804 - tasty-golden, 5805 - tasty-hunit, 5806 - tasty-quickcheck, 5807 - temporary, 5808 - text, 5809 - time, 5810 - transformers, 5811 - tree-diff, 5812 - unix, 5813 - }: 5814 - mkDerivation { 5815 - pname = "Cabal"; 5816 - version = "3.2.1.0"; 5817 - sha256 = "1xfn9q6jnbp3jc6swn4hapa83f5m66pjz8fqbqmffydagf36fkzy"; 5818 - revision = "1"; 5819 - editedCabalFile = "07brbxkjlf1yqs9bjdwcwq1gx853kh600qnrf6bnya92q1p0fhw7"; 5820 - setupHaskellDepends = [ 5821 - mtl 5822 - parsec 5823 - ]; 5824 - libraryHaskellDepends = [ 5825 - array 5826 - base 5827 - binary 5828 - bytestring 5829 - containers 5830 - deepseq 5831 - directory 5832 - filepath 5833 - mtl 5834 - parsec 5835 - pretty 5836 - process 5837 - text 5838 - time 5839 - transformers 5840 - unix 5841 - ]; 5842 - testHaskellDepends = [ 5843 - array 5844 - base 5845 - base-compat 5846 - base-orphans 5847 - binary 5848 - bytestring 5849 - containers 5850 - deepseq 5851 - Diff 5852 - directory 5853 - filepath 5854 - integer-logarithms 5855 - optparse-applicative 5856 - pretty 5857 - process 5858 - QuickCheck 5859 - stm 5860 - tagged 5861 - tar 5862 - tasty 5863 - tasty-golden 5864 - tasty-hunit 5865 - tasty-quickcheck 5866 - temporary 5867 - text 5868 - tree-diff 5869 - ]; 5870 - doCheck = false; 5871 - description = "A framework for packaging Haskell software"; 5872 - license = lib.licenses.bsd3; 5873 - hydraPlatforms = lib.platforms.none; 5874 - } 5875 - ) { }; 5876 - 5877 5779 "Cabal_3_10_3_0" = callPackage ( 5878 5780 { 5879 5781 mkDerivation, ··· 257381 257283 genprimopcode = null; 257382 257284 }; 257383 257285 257384 - "ghc-api-compat_8_10_7" = callPackage ( 257385 - { 257386 - mkDerivation, 257387 - base, 257388 - ghc, 257389 - }: 257390 - mkDerivation { 257391 - pname = "ghc-api-compat"; 257392 - version = "8.10.7"; 257393 - sha256 = "1swsly340pj4inmk1l57q4s0dpw8iibl192y1zayvkgc43zky62a"; 257394 - libraryHaskellDepends = [ 257395 - base 257396 - ghc 257397 - ]; 257398 - doHaddock = false; 257399 - description = "GHC-API compatibility helpers"; 257400 - license = lib.licenses.bsd3; 257401 - hydraPlatforms = lib.platforms.none; 257402 - broken = true; 257403 - } 257404 - ) { }; 257405 - 257406 257286 "ghc-api-compat" = callPackage ( 257407 257287 { 257408 257288 mkDerivation, ··· 260881 260761 license = lib.licenses.mit; 260882 260762 hydraPlatforms = lib.platforms.none; 260883 260763 broken = true; 260884 - } 260885 - ) { }; 260886 - 260887 - "ghc-source-gen_0_4_5_0" = callPackage ( 260888 - { 260889 - mkDerivation, 260890 - base, 260891 - ghc, 260892 - ghc-paths, 260893 - QuickCheck, 260894 - tasty, 260895 - tasty-hunit, 260896 - tasty-quickcheck, 260897 - }: 260898 - mkDerivation { 260899 - pname = "ghc-source-gen"; 260900 - version = "0.4.5.0"; 260901 - sha256 = "18v6i0a6j72brwr7zq0j0igmkzigx3w4a6rdhq8cn768vflpflvv"; 260902 - libraryHaskellDepends = [ 260903 - base 260904 - ghc 260905 - ]; 260906 - testHaskellDepends = [ 260907 - base 260908 - ghc 260909 - ghc-paths 260910 - QuickCheck 260911 - tasty 260912 - tasty-hunit 260913 - tasty-quickcheck 260914 - ]; 260915 - description = "Constructs Haskell syntax trees for the GHC API"; 260916 - license = lib.licenses.bsd3; 260917 - hydraPlatforms = lib.platforms.none; 260918 260764 } 260919 260765 ) { }; 260920 260766 ··· 268874 268720 description = "manage files with git, without checking their contents into git"; 268875 268721 license = lib.licenses.agpl3Only; 268876 268722 mainProgram = "git-annex"; 268877 - maintainers = [ 268878 - lib.maintainers.peti 268879 - lib.maintainers.roosemberth 268880 - ]; 268723 + maintainers = [ lib.maintainers.peti ]; 268881 268724 } 268882 268725 ) { }; 268883 268726 ··· 333220 333063 } 333221 333064 ) { inherit (pkgs) libsass; }; 333222 333065 333223 - "hlint_3_4_1" = callPackage ( 333224 - { 333225 - mkDerivation, 333226 - aeson, 333227 - ansi-terminal, 333228 - base, 333229 - bytestring, 333230 - cmdargs, 333231 - containers, 333232 - cpphs, 333233 - data-default, 333234 - deriving-aeson, 333235 - directory, 333236 - extra, 333237 - file-embed, 333238 - filepath, 333239 - filepattern, 333240 - ghc-lib-parser, 333241 - ghc-lib-parser-ex, 333242 - hscolour, 333243 - process, 333244 - refact, 333245 - text, 333246 - transformers, 333247 - uniplate, 333248 - unordered-containers, 333249 - utf8-string, 333250 - vector, 333251 - yaml, 333252 - }: 333253 - mkDerivation { 333254 - pname = "hlint"; 333255 - version = "3.4.1"; 333256 - sha256 = "0bkk03c9hacvfd73dk89g4r81b50g7pjgw5pavldali4qwss34cz"; 333257 - revision = "1"; 333258 - editedCabalFile = "1rdaffg5n179yfcn5zjwjb0bki09qy13gz2ijky455y9pbaz8yz9"; 333259 - isLibrary = true; 333260 - isExecutable = true; 333261 - enableSeparateDataOutput = true; 333262 - libraryHaskellDepends = [ 333263 - aeson 333264 - ansi-terminal 333265 - base 333266 - bytestring 333267 - cmdargs 333268 - containers 333269 - cpphs 333270 - data-default 333271 - deriving-aeson 333272 - directory 333273 - extra 333274 - file-embed 333275 - filepath 333276 - filepattern 333277 - ghc-lib-parser 333278 - ghc-lib-parser-ex 333279 - hscolour 333280 - process 333281 - refact 333282 - text 333283 - transformers 333284 - uniplate 333285 - unordered-containers 333286 - utf8-string 333287 - vector 333288 - yaml 333289 - ]; 333290 - executableHaskellDepends = [ base ]; 333291 - description = "Source code suggestions"; 333292 - license = lib.licenses.bsd3; 333293 - hydraPlatforms = lib.platforms.none; 333294 - mainProgram = "hlint"; 333295 - maintainers = [ lib.maintainers.maralorn ]; 333296 - } 333297 - ) { }; 333298 - 333299 333066 "hlint_3_6_1" = callPackage ( 333300 333067 { 333301 333068 mkDerivation, ··· 666696 666463 } 666697 666464 ) { }; 666698 666465 666699 - "text_2_0_2" = callPackage ( 666700 - { 666701 - mkDerivation, 666702 - array, 666703 - base, 666704 - binary, 666705 - bytestring, 666706 - containers, 666707 - deepseq, 666708 - directory, 666709 - filepath, 666710 - ghc-prim, 666711 - QuickCheck, 666712 - system-cxx-std-lib, 666713 - tasty, 666714 - tasty-bench, 666715 - tasty-hunit, 666716 - tasty-inspection-testing, 666717 - tasty-quickcheck, 666718 - template-haskell, 666719 - transformers, 666720 - }: 666721 - mkDerivation { 666722 - pname = "text"; 666723 - version = "2.0.2"; 666724 - sha256 = "1bggb4gq15r7z685w7c7hbm3w4n6day451ickz70d1l919jvwdf7"; 666725 - revision = "1"; 666726 - editedCabalFile = "1k25ba7hxgsj155yjmi218lhhyw640r4d4zr105gvhfkcj6gmdbi"; 666727 - libraryHaskellDepends = [ 666728 - array 666729 - base 666730 - binary 666731 - bytestring 666732 - deepseq 666733 - ghc-prim 666734 - system-cxx-std-lib 666735 - template-haskell 666736 - ]; 666737 - testHaskellDepends = [ 666738 - base 666739 - bytestring 666740 - deepseq 666741 - directory 666742 - ghc-prim 666743 - QuickCheck 666744 - tasty 666745 - tasty-hunit 666746 - tasty-inspection-testing 666747 - tasty-quickcheck 666748 - template-haskell 666749 - transformers 666750 - ]; 666751 - benchmarkHaskellDepends = [ 666752 - base 666753 - bytestring 666754 - containers 666755 - deepseq 666756 - directory 666757 - filepath 666758 - tasty-bench 666759 - transformers 666760 - ]; 666761 - doCheck = false; 666762 - description = "An efficient packed Unicode text type"; 666763 - license = lib.licenses.bsd2; 666764 - hydraPlatforms = lib.platforms.none; 666765 - } 666766 - ) { }; 666767 - 666768 666466 "text_2_1_2" = callPackage ( 666769 666467 { 666770 666468 mkDerivation, ··· 721682 721380 hydraPlatforms = lib.platforms.none; 721683 721381 mainProgram = "wedged"; 721684 721382 broken = true; 721685 - } 721686 - ) { }; 721687 - 721688 - "weeder_2_2_0" = callPackage ( 721689 - { 721690 - mkDerivation, 721691 - algebraic-graphs, 721692 - base, 721693 - bytestring, 721694 - containers, 721695 - dhall, 721696 - directory, 721697 - filepath, 721698 - generic-lens, 721699 - ghc, 721700 - lens, 721701 - mtl, 721702 - optparse-applicative, 721703 - regex-tdfa, 721704 - text, 721705 - transformers, 721706 - }: 721707 - mkDerivation { 721708 - pname = "weeder"; 721709 - version = "2.2.0"; 721710 - sha256 = "07ylcq8mza4429snaklhfszpg2c0xcp75hyf0jxhi32mpiz7a5v2"; 721711 - isLibrary = true; 721712 - isExecutable = true; 721713 - libraryHaskellDepends = [ 721714 - algebraic-graphs 721715 - base 721716 - bytestring 721717 - containers 721718 - dhall 721719 - directory 721720 - filepath 721721 - generic-lens 721722 - ghc 721723 - lens 721724 - mtl 721725 - optparse-applicative 721726 - regex-tdfa 721727 - text 721728 - transformers 721729 - ]; 721730 - executableHaskellDepends = [ 721731 - base 721732 - bytestring 721733 - containers 721734 - directory 721735 - filepath 721736 - ghc 721737 - optparse-applicative 721738 - transformers 721739 - ]; 721740 - description = "Detect dead code"; 721741 - license = lib.licenses.bsd3; 721742 - hydraPlatforms = lib.platforms.none; 721743 - mainProgram = "weeder"; 721744 - maintainers = [ lib.maintainers.maralorn ]; 721745 721383 } 721746 721384 ) { }; 721747 721385
+13 -110
pkgs/top-level/haskell-packages.nix
··· 9 9 }: 10 10 11 11 let 12 - # These are attributes in compiler that support integer-simple. 13 - integerSimpleIncludes = [ 14 - "ghc810" 15 - "ghc8107" 16 - ]; 17 - 18 - nativeBignumExcludes = integerSimpleIncludes ++ [ 12 + nativeBignumExcludes = [ 19 13 # haskell.compiler sub groups 20 - "integer-simple" 21 14 "native-bignum" 22 15 # Binary GHCs 23 - "ghc8107Binary" 24 16 "ghc902Binary" 25 17 "ghc924Binary" 26 18 "ghc963Binary" ··· 78 70 bb = pkgsBuildBuild.haskell; 79 71 in 80 72 { 81 - ghc8107Binary = callPackage ../development/compilers/ghc/8.10.7-binary.nix { 82 - llvmPackages = pkgs.llvmPackages_12; 83 - }; 84 - 85 73 ghc902Binary = callPackage ../development/compilers/ghc/9.0.2-binary.nix { 86 74 llvmPackages = pkgs.llvmPackages_12; 87 75 }; ··· 98 86 llvmPackages = pkgs.llvmPackages_15; 99 87 }; 100 88 101 - ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix { 102 - bootPkgs = bb.packages.ghc8107Binary; 103 - inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12 104 - python3 = buildPackages.python311; # so that we don't have two of them 105 - # Need to use apple's patched xattr until 106 - # https://github.com/xattr/xattr/issues/44 and 107 - # https://github.com/xattr/xattr/issues/55 are solved. 108 - inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 109 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; 110 - llvmPackages = pkgs.llvmPackages_12; 111 - }; 112 - ghc810 = compiler.ghc8107; 113 - ghc928 = callPackage ../development/compilers/ghc/9.2.8.nix { 114 - bootPkgs = 115 - # GHC >= 9.0 removed the armv7l bindist 116 - if stdenv.buildPlatform.isAarch32 then bb.packages.ghc8107Binary else bb.packages.ghc902Binary; 117 - inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12 118 - python3 = buildPackages.python311; # so that we don't have two of them 119 - # Need to use apple's patched xattr until 120 - # https://github.com/xattr/xattr/issues/44 and 121 - # https://github.com/xattr/xattr/issues/55 are solved. 122 - inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; 123 - buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; 124 - llvmPackages = pkgs.llvmPackages_12; 125 - }; 126 - ghc92 = compiler.ghc928; 127 89 ghc948 = callPackage ../development/compilers/ghc/9.4.8.nix { 128 90 bootPkgs = 129 91 # Building with 9.2 is broken due to ··· 140 102 }; 141 103 ghc94 = compiler.ghc948; 142 104 ghc963 = callPackage ../development/compilers/ghc/9.6.3.nix { 143 - bootPkgs = 144 - # For GHC 9.2 no armv7l bindists are available. 145 - if stdenv.buildPlatform.isAarch32 then bb.packages.ghc928 else bb.packages.ghc924Binary; 105 + bootPkgs = bb.packages.ghc924Binary; 146 106 inherit (buildPackages.python3Packages) sphinx; 147 107 # Need to use apple's patched xattr until 148 108 # https://github.com/xattr/xattr/issues/44 and ··· 153 113 llvmPackages = pkgs.llvmPackages_15; 154 114 }; 155 115 ghc967 = callPackage ../development/compilers/ghc/9.6.7.nix { 156 - bootPkgs = 157 - # For GHC 9.2 no armv7l bindists are available. 158 - if stdenv.buildPlatform.isAarch32 then bb.packages.ghc928 else bb.packages.ghc924Binary; 116 + bootPkgs = bb.packages.ghc924Binary; 159 117 inherit (buildPackages.python3Packages) sphinx; 160 118 # Need to use apple's patched xattr until 161 119 # https://github.com/xattr/xattr/issues/44 and ··· 170 128 bootPkgs = 171 129 if stdenv.buildPlatform.isAarch64 && stdenv.buildPlatform.isMusl then 172 130 bb.packages.ghc984Binary 173 - else if stdenv.buildPlatform.isAarch32 then 174 - # For GHC 9.6 no armv7l bindists are available. 175 - bb.packages.ghc963 176 131 else 177 132 bb.packages.ghc963Binary; 178 133 inherit (buildPackages.python3Packages) sphinx; ··· 187 142 ghc98 = compiler.ghc984; 188 143 ghc9101 = callPackage ../development/compilers/ghc/9.10.1.nix { 189 144 bootPkgs = 190 - # For GHC 9.6 no armv7l bindists are available. 191 - if stdenv.buildPlatform.isAarch32 then 192 - bb.packages.ghc963 193 - else if stdenv.buildPlatform.isDarwin then 145 + if stdenv.buildPlatform.isDarwin then 194 146 # it seems like the GHC 9.6.* bindists are built with a different 195 147 # toolchain than we are using (which I'm guessing from the fact 196 148 # that 9.6.4 bindists pass linker flags our ld doesn't support). ··· 210 162 }; 211 163 ghc9102 = callPackage ../development/compilers/ghc/9.10.2.nix { 212 164 bootPkgs = 213 - # For GHC 9.6 no armv7l bindists are available. 214 - if stdenv.buildPlatform.isAarch32 then 215 - bb.packages.ghc963 216 - else if stdenv.buildPlatform.isDarwin then 165 + if stdenv.buildPlatform.isDarwin then 217 166 # it seems like the GHC 9.6.* bindists are built with a different 218 167 # toolchain than we are using (which I'm guessing from the fact 219 168 # that 9.6.4 bindists pass linker flags our ld doesn't support). ··· 260 209 }; 261 210 ghc912 = compiler.ghc9122; 262 211 ghcHEAD = callPackage ../development/compilers/ghc/head.nix { 263 - bootPkgs = 264 - # No armv7l bindists are available. 265 - if stdenv.buildPlatform.isAarch32 then bb.packages.ghc984 else bb.packages.ghc984Binary; 212 + bootPkgs = bb.packages.ghc984Binary; 266 213 inherit (buildPackages.python3Packages) sphinx; 267 214 # Need to use apple's patched xattr until 268 215 # https://github.com/xattr/xattr/issues/44 and ··· 273 220 llvmPackages = pkgs.llvmPackages_18; 274 221 }; 275 222 276 - # The integer-simple attribute set contains all the GHC compilers 277 - # build with integer-simple instead of integer-gmp. 278 - integer-simple = 279 - let 280 - integerSimpleGhcNames = pkgs.lib.filter (name: builtins.elem name integerSimpleIncludes) ( 281 - pkgs.lib.attrNames compiler 282 - ); 283 - in 284 - pkgs.recurseIntoAttrs ( 285 - pkgs.lib.genAttrs integerSimpleGhcNames ( 286 - name: compiler.${name}.override { enableIntegerSimple = true; } 287 - ) 288 - ); 289 - 290 223 # Starting from GHC 9, integer-{simple,gmp} is replaced by ghc-bignum 291 224 # with "native" and "gmp" backends. 292 225 native-bignum = ··· 302 235 ); 303 236 } 304 237 // pkgs.lib.optionalAttrs config.allowAliases { 238 + ghc810 = throw "'haskell.compiler.ghc810' has been removed."; # Added 2025-09-07 239 + ghc90 = throw "'haskell.compiler.ghc90' has been removed."; # Added 2025-09-07 240 + ghc92 = throw "'haskell.compiler.ghc92' has been removed."; # Added 2025-09-07 305 241 ghcjs = throw "'haskell.compiler.ghcjs' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06 306 242 ghcjs810 = throw "'haskell.compiler.ghcjs810' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06 243 + integer-simple = throw "All GHC versions with integer-simple support have been removed."; # Added 2025-09-07 307 244 } 308 245 ); 309 246 ··· 316 253 bh = buildPackages.haskell; 317 254 in 318 255 { 319 - ghc8107Binary = callPackage ../development/haskell-modules { 320 - buildHaskellPackages = bh.packages.ghc8107Binary; 321 - ghc = bh.compiler.ghc8107Binary; 322 - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; 323 - packageSetConfig = bootstrapPackageSet; 324 - }; 325 256 ghc902Binary = callPackage ../development/haskell-modules { 326 257 buildHaskellPackages = bh.packages.ghc902Binary; 327 258 ghc = bh.compiler.ghc902Binary; ··· 346 277 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { }; 347 278 packageSetConfig = bootstrapPackageSet; 348 279 }; 349 - ghc8107 = callPackage ../development/haskell-modules { 350 - buildHaskellPackages = bh.packages.ghc8107; 351 - ghc = bh.compiler.ghc8107; 352 - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; 353 - }; 354 - ghc810 = packages.ghc8107; 355 - ghc928 = callPackage ../development/haskell-modules { 356 - buildHaskellPackages = bh.packages.ghc928; 357 - ghc = bh.compiler.ghc928; 358 - compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { }; 359 - }; 360 - ghc92 = packages.ghc928; 361 280 ghc948 = callPackage ../development/haskell-modules { 362 281 buildHaskellPackages = bh.packages.ghc948; 363 282 ghc = bh.compiler.ghc948; ··· 409 328 compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.14.x.nix { }; 410 329 }; 411 330 412 - # The integer-simple attribute set contains package sets for all the GHC compilers 413 - # using integer-simple instead of integer-gmp. 414 - integer-simple = 415 - let 416 - integerSimpleGhcNames = pkgs.lib.filter (name: builtins.elem name integerSimpleIncludes) ( 417 - pkgs.lib.attrNames packages 418 - ); 419 - in 420 - pkgs.lib.genAttrs integerSimpleGhcNames ( 421 - name: 422 - packages.${name}.override (oldAttrs: { 423 - ghc = bh.compiler.integer-simple.${name}; 424 - buildHaskellPackages = bh.packages.integer-simple.${name}; 425 - overrides = pkgs.lib.composeExtensions (oldAttrs.overrides or (_: _: { })) ( 426 - _: _: { integer-simple = null; } 427 - ); 428 - }) 429 - ); 430 - 431 331 native-bignum = 432 332 let 433 333 nativeBignumGhcNames = pkgs.lib.filter (name: !(builtins.elem name nativeBignumExcludes)) ( ··· 443 343 ); 444 344 } 445 345 // pkgs.lib.optionalAttrs config.allowAliases { 346 + ghc810 = throw "'haskell.packages.ghc810' has been removed."; # Added 2025-09-07 446 347 ghc90 = throw "'haskell.packages.ghc90' has been removed."; # Added 2025-09-07 348 + ghc92 = throw "'haskell.packages.ghc92' has been removed."; # Added 2025-09-07 447 349 ghcjs = throw "'haskell.packages.ghcjs' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06 448 350 ghcjs810 = throw "'haskell.packages.ghcjs810' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06 351 + integer-simple = throw "All GHC versions with integer-simple support have been removed."; # Added 2025-09-07 449 352 }; 450 353 }
+1 -27
pkgs/top-level/release-haskell.nix
··· 63 63 64 64 # list of all compilers to test specific packages on 65 65 released = with compilerNames; [ 66 - ghc8107 67 - ghc928 68 66 ghc948 69 67 ghc963 70 68 ghc967 ··· 519 517 # Cross compilation of GHC 520 518 haskell.compiler = { 521 519 inherit (packagePlatforms pkgs.pkgsCross.riscv64.haskell.compiler) 522 - # Our oldest GHC which still uses its own expression. 8.10.7 can 523 - # theoretically be used to chain bootstrap all GHCs on riscv64 524 - # which doesn't have official bindists. 525 - ghc8107 526 520 # Latest GHC we are able to cross-compile. 527 521 ghc948 528 522 ; ··· 533 527 # Cross compilation of GHC 534 528 haskell.compiler = { 535 529 inherit (packagePlatforms pkgs.pkgsCross.aarch64-multiplatform.haskell.compiler) 536 - # Uses a separate expression and LLVM backend for aarch64. 537 - ghc8107 538 530 # Latest GHC we are able to cross-compile. Uses NCG backend. 539 531 ghc948 540 532 ; ··· 554 546 # from the package sets. Due to (transitively) requiring recent versions 555 547 # of core packages, it is not always reasonable to get cabal-install to 556 548 # work with older compilers. 557 - compilerNames.ghc8107 558 - compilerNames.ghc928 559 549 compilerNames.ghc948 560 550 ] released; 561 551 Cabal_3_10_3_0 = lib.subtractLists [ ··· 573 563 compilerNames.ghc9101 574 564 compilerNames.ghc9102 575 565 ]; 576 - haskell-language-server = lib.subtractLists [ 577 - # Support ceased as of 2.3.0.0 578 - compilerNames.ghc8107 579 - # Support ceased as of 2.10.0.0 580 - compilerNames.ghc928 581 - ] released; 566 + haskell-language-server = released; 582 567 hoogle = released; 583 568 hlint = lib.subtractLists [ 584 569 compilerNames.ghc9101 ··· 591 576 language-nix = released; 592 577 nix-paths = released; 593 578 titlecase = released; 594 - ghc-api-compat = [ 595 - compilerNames.ghc8107 596 - ]; 597 - ghc-bignum = [ 598 - compilerNames.ghc8107 599 - ]; 600 579 ghc-lib = released; 601 580 ghc-lib-parser = released; 602 581 ghc-lib-parser-ex = released; ··· 679 658 ]; 680 659 }; 681 660 constituents = accumulateDerivations [ 682 - jobs.pkgsMusl.haskell.compiler.ghc8107Binary 683 - jobs.pkgsMusl.haskell.compiler.ghc8107 684 - jobs.pkgsMusl.haskell.compiler.ghc928 685 661 jobs.pkgsMusl.haskell.compiler.ghcHEAD 686 - jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107 687 - jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928 688 662 jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD 689 663 ]; 690 664 };
-1
pkgs/top-level/release.nix
··· 363 363 packages = 364 364 genAttrs 365 365 [ 366 - "ghc92" 367 366 "ghc94" 368 367 "ghc96" 369 368 "ghc98"