Skip to content

Commit 33735c2

Browse files
Merge branch 'haskell-updates' into staging
2 parents 3834f73 + 44f5c58 commit 33735c2

39 files changed

Lines changed: 2800 additions & 1070 deletions

doc/languages-frameworks/haskell.section.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,14 @@ the same package with the `previousIntermediates` argument to support
260260
incremental builds. See [“Incremental builds”](#haskell-incremental-builds) for
261261
more information. Defaults to `false`.
262262

263+
`dontConvertCabalFileToUnix`
264+
: By default, `haskellPackages.mkDerivation` converts the `.cabal` file of a
265+
given package to Unix line endings.
266+
This is intended to work around
267+
[Hackage converting revised `.cabal` files to DOS line endings](https://github.com/haskell/hackage-server/issues/316)
268+
which frequently causes patches to stop applying.
269+
You can pass `true` to disable this behavior.
270+
263271
`enableLibraryProfiling`
264272
: Whether to enable [profiling][profiling] for libraries contained in the
265273
package. Enabled by default if supported.
@@ -1249,8 +1257,8 @@ it does for the unstable branches.
12491257
### Why is topic X not covered in this section? Why is section Y missing? {#haskell-why-not-covered}
12501258

12511259
We have been working on [moving the nixpkgs Haskell documentation back into the
1252-
nixpkgs manual](https://github.com/NixOS/nixpkgs/issues/121403). Since this
1253-
process has not been completed yet, you may find some topics missing here
1260+
nixpkgs manual](https://github.com/NixOS/nixpkgs/issues/121403). <!-- krank:ignore-line -->
1261+
Since this process has not been completed yet, you may find some topics missing here
12541262
covered in the old [haskell4nix docs](https://haskell4nix.readthedocs.io/).
12551263

12561264
If you feel any important topic is not documented at all, feel free to comment

doc/release-notes/rl-2511.section.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
- GHC 8.6, 8.10, 9.0, 9.2, and their package sets have been removed.
5151

52+
- The `haskellPackages.mkDerivation` builder now converts packages' cabal files to Unix line endings before `patchPhase`. This behavior can be disabled using `dontConvertCabalFileToUnix`.
53+
5254
- Support for bootstrapping native GHC compilers on 32‐bit ARM and little‐endian 64‐bit PowerPC has been dropped.
5355
The latter was probably broken anyway.
5456
If there is interest in restoring support for these architectures, it should be possible to cross‐compile a bootstrap GHC binary.

pkgs/by-name/ec/echidna/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ haskellPackages.mkDerivation rec {
9696
makeWrapper
9797
];
9898

99-
preConfigure = ''
99+
prePatch = ''
100100
hpack
101101
'';
102102

pkgs/data/misc/hackage/pin.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "c074fec58a2c83bfb17c273302005fe2625207f1",
3-
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/c074fec58a2c83bfb17c273302005fe2625207f1.tar.gz",
4-
"sha256": "1my6xrg3m694fr3k5386yx5wqd2j0wdxfx6g3scnh5af0sx2hx0w",
5-
"msg": "Update from Hackage at 2025-09-14T21:34:10Z"
2+
"commit": "bea83e4ce667f3d0652a67d1f8e13f5c644d6551",
3+
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/bea83e4ce667f3d0652a67d1f8e13f5c644d6551.tar.gz",
4+
"sha256": "10lfqcjrckxjb74xwcm73hphw1y53n080pwmjf7xzyga9hf594cn",
5+
"msg": "Update from Hackage at 2025-09-25T14:09:07Z"
66
}

pkgs/development/compilers/ghc/common-hadrian.nix

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187

188188
lib.optionals (lib.versionOlder version "9.8") [
189189
# Fix unlit being installed under a different name than is used in the
190-
# settings file: https://gitlab.haskell.org/ghc/ghc/-/issues/23317
190+
# settings file: https://gitlab.haskell.org/ghc/ghc/-/issues/23317 krank:ignore-line
191191
(fetchpatch {
192192
name = "ghc-9.6-fix-unlit-path.patch";
193193
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/8fde4ac84ec7b1ead238cb158bbef48555d12af9.patch";
@@ -200,7 +200,7 @@
200200
#
201201
# These cause problems as they're not eliminated by GHC's dead code
202202
# elimination on aarch64-darwin. (see
203-
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
203+
# https://github.com/NixOS/nixpkgs/issues/140774 for details). krank:ignore-line
204204
(
205205
if lib.versionOlder version "9.10" then
206206
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
@@ -216,12 +216,17 @@
216216
hash = "sha256-sb+AHdkGkCu8MW0xoQIpD5kEc0zYX8udAMDoC+TWc0Q=";
217217
})
218218
]
219+
++ lib.optionals stdenv.targetPlatform.isGhcjs [
220+
# https://gitlab.haskell.org/ghc/ghc/-/issues/26290
221+
./export-heap-methods.patch
222+
]
219223
# Prevents passing --hyperlinked-source to haddock. Note that this can
220224
# be configured via a user defined flavour now. Unfortunately, it is
221225
# impossible to import an existing flavour in UserSettings, so patching
222226
# the defaults is actually simpler and less maintenance intensive
223227
# compared to keeping an entire flavour definition in sync with upstream
224-
# manually. See also https://gitlab.haskell.org/ghc/ghc/-/issues/23625
228+
# manually.
229+
# See also https://gitlab.haskell.org/ghc/ghc/-/issues/23625 krank:ignore-line
225230
++ lib.optionals (!enableHyperlinkedSource) [
226231
(
227232
if lib.versionOlder version "9.8" then
@@ -256,7 +261,7 @@
256261
]
257262
# Fixes stack overrun in rts which crashes an process whenever
258263
# freeHaskellFunPtr is called with nixpkgs' hardening flags.
259-
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485
264+
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485 krank:ignore-line
260265
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13599
261266
++ lib.optionals (lib.versionOlder version "9.13") [
262267
(fetchpatch {
@@ -779,7 +784,8 @@ stdenv.mkDerivation (
779784
780785
''
781786
# the bindist configure script uses different env variables than the GHC configure script
782-
# see https://github.com/NixOS/nixpkgs/issues/267250 and https://gitlab.haskell.org/ghc/ghc/-/issues/24211
787+
# see https://github.com/NixOS/nixpkgs/issues/267250 krank:ignore-line
788+
# https://gitlab.haskell.org/ghc/ghc/-/issues/24211 krank:ignore-line
783789
+ lib.optionalString (stdenv.targetPlatform.linker == "cctools") ''
784790
export InstallNameToolCmd=$INSTALL_NAME_TOOL
785791
export OtoolCmd=$OTOOL

pkgs/development/compilers/ghc/common-make-native-bignum.nix

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ let
134134
# program is built (which we generally always want to have a complete GHC install)
135135
# and whether it is run on the GHC sources to generate hyperlinked source code
136136
# (which is impossible for cross-compilation); see:
137-
# https://gitlab.haskell.org/ghc/ghc/-/issues/20077
137+
# https://gitlab.haskell.org/ghc/ghc/-/issues/20077 krank:ignore-line
138138
# This implies that currently a cross-compiled GHC will never have a `haddock`
139139
# program, so it can never generate haddocks for any packages.
140140
# If this is solved in the future, we'd like to unconditionally
@@ -292,8 +292,8 @@ stdenv.mkDerivation (
292292
patches = [
293293
# Determine size of time related types using hsc2hs instead of assuming CLong.
294294
# Prevents failures when e.g. stat(2)ing on 32bit systems with 64bit time_t etc.
295-
# https://github.com/haskell/ghcup-hs/issues/1107
296-
# https://gitlab.haskell.org/ghc/ghc/-/issues/25095
295+
# https://github.com/haskell/ghcup-hs/issues/1107 krank:ignore-line
296+
# https://gitlab.haskell.org/ghc/ghc/-/issues/25095 krank:ignore-line
297297
# Note that in normal situations this shouldn't be the case since nixpkgs
298298
# doesn't set -D_FILE_OFFSET_BITS=64 and friends (yet).
299299
(fetchpatch {
@@ -304,7 +304,7 @@ stdenv.mkDerivation (
304304
extraPrefix = "libraries/unix/";
305305
})
306306

307-
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
307+
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129 krank:ignore-line
308308
./docs-sphinx-7.patch
309309

310310
# Correctly record libnuma's library and include directories in the
@@ -328,7 +328,7 @@ stdenv.mkDerivation (
328328
# the solution is to backport those changes from GHC 9.6 that skip the intermediate
329329
# assembly step.
330330
#
331-
# https://gitlab.haskell.org/ghc/ghc/-/issues/25608#note_622589
331+
# https://gitlab.haskell.org/ghc/ghc/-/issues/25608#note_622589 krank:ignore-line
332332
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6877
333333
++ [
334334
# Need to use this patch so the next one applies, passes file location info to the cc phase
@@ -369,7 +369,7 @@ stdenv.mkDerivation (
369369

370370
# Fixes stack overrun in rts which crashes an process whenever
371371
# freeHaskellFunPtr is called with nixpkgs' hardening flags.
372-
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485
372+
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485 krank:ignore-line
373373
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13599
374374
# TODO: patch doesn't apply for < 9.4, but may still be necessary?
375375
++ [
@@ -386,7 +386,7 @@ stdenv.mkDerivation (
386386
#
387387
# These cause problems as they're not eliminated by GHC's dead code
388388
# elimination on aarch64-darwin. (see
389-
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
389+
# https://github.com/NixOS/nixpkgs/issues/140774 for details). krank:ignore-line
390390
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
391391
];
392392

pkgs/development/compilers/ghc/docs-sphinx-7.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Fix build of docs after sphinx update.
22
https://github.com/sphinx-doc/sphinx/pull/11381
3-
https://gitlab.haskell.org/ghc/ghc/-/issues/24129
3+
https://gitlab.haskell.org/ghc/ghc/-/issues/24129 krank:ignore-line
44
--- a/docs/users_guide/rtd-theme/layout.html
55
+++ b/docs/users_guide/rtd-theme/layout.html
66
@@ -67 +67 @@
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/rts/js/mem.js b/rts/js/mem.js
2+
index 44c5c37ac4..1f150c5d55 100644
3+
--- a/rts/js/mem.js
4+
+++ b/rts/js/mem.js
5+
@@ -1,5 +1,5 @@
6+
//#OPTIONS:CPP
7+
-//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot
8+
+//#OPTIONS:EMCC:EXPORTED_RUNTIME_METHODS=addFunction,removeFunction,getEmptyTableSlot,HEAP8,HEAPU8
9+
10+
// #define GHCJS_TRACE_META 1
11+

pkgs/development/compilers/ghc/subopt.bash

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
#
1515
# No attempt is made to support custom LLVM optimization flags, or the
1616
# undocumented flag to disable TBAA, or avoid
17-
# <https://gitlab.haskell.org/ghc/ghc/-/issues/23870>, as these are not
18-
# required to bootstrap GHC and at worst will produce an error message.
17+
# <https://gitlab.haskell.org/ghc/ghc/-/issues/23870> (krank:ignore-line),
18+
# as these are not required to bootstrap GHC and at worst will produce an
19+
# error message.
1920
#
2021
# It is called `subopt` to reflect the fact that it uses `opt(1)` as a
2122
# subprocess, and the fact that the GHC build system situation

pkgs/development/haskell-modules/HACKING.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,6 @@ opening the next one. When you want to merge the currently open
199199
$ gh auth status
200200
```
201201

202-
1. Make sure you have setup your `~/.cabal/config` file for authentication
203-
for uploading the NixOS package versions to Hackage. See the following
204-
section for details on how to do this.
205-
206202
1. Make sure you have correctly marked packages broken. One of the previous
207203
sections explains how to do this.
208204

@@ -237,8 +233,6 @@ opening the next one. When you want to merge the currently open
237233

238234
1. Merges the currently open `haskell-updates` PR.
239235

240-
1. Updates the version of Haskell packages in NixOS on Hackage.
241-
242236
1. Updates Stackage and Hackage snapshots. Regenerates the Haskell package set.
243237

244238
1. Pushes the commits updating Stackage and Hackage and opens a new

0 commit comments

Comments
 (0)