Skip to content

Commit 7a6dc9d

Browse files
authored
Add nixpkgs-2411 and update other nixpkgs pins (#2307)
* Add nixpkgs-2411 and update other nixpkgs pins * Avoid broken nixpkgs ghc 9.0.2 (use 9.6.4 when present) * Relax version check * Fix for ghc 9.10.1 * Stick with ghc 8.10.7 for old versions of alex and happy * Fix for GHC 8.10.7 * Fix warning from srcOnly * Avoid https://gitlab.haskell.org/ghc/ghc/-/issues/25608 * Only patch rcodesign 0.22.0 * ifdLevel 1 * Remove ghc boot tools from roots (having ghc in roots should be enough) * Add missing casts * Fix for windows cross compilation * Fix for windows cross compilation * is_io_mng_native_p is in RtsFlags.h for older versions of GHC * Fix for windows cross compilation * ifdLevel 2 * ifdLevel 3 * Fix HsOpenSSL tests * Fix HsOpenSSL tests * Fix HsOpenSSL tests * Drop ghc 8.10 from ci * Drop mingwW64 from ci * Skip flaky test * Add mingwW64 back into ci (but not GHC 9.6.6) * Drop GHC <9.6 from CI * Remove unused hydra input See #2308 * Use ghc 9.6.6 for github tests * Use nixpkgs-unstable directly (instead of via `follows`) in default.nix * Update shell-for test to use IFD * Update shell-for test to use IFD
1 parent 65d9f77 commit 7a6dc9d

38 files changed

+1019
-618
lines changed

.github/workflows/pipeline.yml

+39-39
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Run tests with ghc8107"
1+
name: "Run tests with ghc966"
22

33
on:
44
pull_request:
@@ -22,120 +22,120 @@ jobs:
2222
runs-on: [self-hosted, linux]
2323
steps:
2424
- uses: actions/checkout@v4
25-
- name: "Run tests with ghc8107: Running the nix-build tests..."
26-
run: "./test/tests.sh ghc8107 nix-build"
25+
- name: "Run tests with ghc966: Running the nix-build tests..."
26+
run: "./test/tests.sh ghc966 nix-build"
2727

2828
unit-tests:
2929
runs-on: [self-hosted, linux]
3030
steps:
3131
- uses: actions/checkout@v4
32-
- name: "Run tests with ghc8107: Running the unit tests..."
33-
run: "./test/tests.sh ghc8107 unit-tests"
32+
- name: "Run tests with ghc966: Running the unit tests..."
33+
run: "./test/tests.sh ghc966 unit-tests"
3434

3535
runghc:
3636
runs-on: [self-hosted, linux]
3737
steps:
3838
- uses: actions/checkout@v4
39-
- name: "Run tests with ghc8107: Checking that a nix-shell works for runghc..."
40-
run: "./test/tests.sh ghc8107 runghc"
39+
- name: "Run tests with ghc966: Checking that a nix-shell works for runghc..."
40+
run: "./test/tests.sh ghc966 runghc"
4141

4242
cabal:
4343
runs-on: [self-hosted, linux]
4444
steps:
4545
- uses: actions/checkout@v4
46-
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal..."
47-
run: "./test/tests.sh ghc8107 cabal"
46+
- name: "Run tests with ghc966: Checking that a nix-shell works for cabal..."
47+
run: "./test/tests.sh ghc966 cabal"
4848

4949
cabal-doExactConfig:
5050
runs-on: [self-hosted, linux]
5151
steps:
5252
- uses: actions/checkout@v4
53-
- name: "Run tests with ghc8107: Checking that a nix-shell works for cabal (doExactConfig component)..."
54-
run: "./test/tests.sh ghc8107 cabal-doExactConfig"
53+
- name: "Run tests with ghc966: Checking that a nix-shell works for cabal (doExactConfig component)..."
54+
run: "./test/tests.sh ghc966 cabal-doExactConfig"
5555

5656
tests-benchmarks:
5757
runs-on: [self-hosted, linux]
5858
steps:
5959
- uses: actions/checkout@v4
60-
- name: "Run tests with ghc8107: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..."
61-
run: "./test/tests.sh ghc8107 tests-benchmarks"
60+
- name: "Run tests with ghc966: Checking that a nix-shell works for a project with test-suite build-tools and benchmarks..."
61+
run: "./test/tests.sh ghc966 tests-benchmarks"
6262

6363
multi-target:
6464
runs-on: [self-hosted, linux]
6565
steps:
6666
- uses: actions/checkout@v4
67-
- name: "Run tests with ghc8107: Checking that a nix-shell works for a multi-target project..."
68-
run: "./test/tests.sh ghc8107 multi-target"
67+
- name: "Run tests with ghc966: Checking that a nix-shell works for a multi-target project..."
68+
run: "./test/tests.sh ghc966 multi-target"
6969

7070
shellFor-single-package:
7171
runs-on: [self-hosted, linux]
7272
steps:
7373
- uses: actions/checkout@v4
74-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, multiple packages..."
75-
run: "./test/tests.sh ghc8107 shellFor-single-package"
74+
- name: "Run tests with ghc966: Checking shellFor works for a cabal project, multiple packages..."
75+
run: "./test/tests.sh ghc966 shellFor-single-package"
7676

7777
shellFor-multiple-package:
7878
runs-on: [self-hosted, linux]
7979
steps:
8080
- uses: actions/checkout@v4
81-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package...y"
82-
run: "./test/tests.sh ghc8107 shellFor-multiple-package"
81+
- name: "Run tests with ghc966: Checking shellFor works for a cabal project, single package...y"
82+
run: "./test/tests.sh ghc966 shellFor-multiple-package"
8383

8484
shellFor-hoogle:
8585
runs-on: [self-hosted, linux]
8686
steps:
8787
- uses: actions/checkout@v4
88-
- name: "Run tests with ghc8107: Checking shellFor works for a cabal project, single package..."
89-
run: "./test/tests.sh ghc8107 shellFor-hoogle"
88+
- name: "Run tests with ghc966: Checking shellFor works for a cabal project, single package..."
89+
run: "./test/tests.sh ghc966 shellFor-hoogle"
9090

9191
shellFor-not-depends:
9292
runs-on: [self-hosted, linux]
9393
steps:
9494
- uses: actions/checkout@v4
95-
- name: "Run tests with ghc8107: Checking shellFor does not depend on given packages...y"
96-
run: "./test/tests.sh ghc8107 shellFor-not-depends"
95+
- name: "Run tests with ghc966: Checking shellFor does not depend on given packages...y"
96+
run: "./test/tests.sh ghc966 shellFor-not-depends"
9797

9898
maintainer-scripts:
9999
runs-on: [self-hosted, linux]
100100
steps:
101101
- uses: actions/checkout@v4
102-
- name: "Run tests with ghc8107: Checking the maintainer scripts...y"
103-
run: "./test/tests.sh ghc8107 maintainer-scripts"
102+
- name: "Run tests with ghc966: Checking the maintainer scripts...y"
103+
run: "./test/tests.sh ghc966 maintainer-scripts"
104104

105105
plan-extra-hackages:
106106
runs-on: [self-hosted, linux]
107107
steps:
108108
- uses: actions/checkout@v4
109-
- name: "Run tests with ghc8107: Checking that plan construction works with extra Hackages..."
110-
run: "./test/tests.sh ghc8107 plan-extra-hackages"
109+
- name: "Run tests with ghc966: Checking that plan construction works with extra Hackages..."
110+
run: "./test/tests.sh ghc966 plan-extra-hackages"
111111

112112
build-extra-hackages:
113113
runs-on: [self-hosted, linux]
114114
steps:
115115
- uses: actions/checkout@v4
116-
- name: "Run tests with ghc8107: Checking that package with extra Hackages can be build..."
117-
run: "./test/tests.sh ghc8107 build-extra-hackages"
116+
- name: "Run tests with ghc966: Checking that package with extra Hackages can be build..."
117+
run: "./test/tests.sh ghc966 build-extra-hackages"
118118

119119
hix:
120120
runs-on: [self-hosted, linux]
121121
steps:
122122
- uses: actions/checkout@v4
123-
- name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
124-
run: "./test/tests.sh ghc8107 hix"
123+
- name: "Run tests with ghc966: End-2-end test of hix project initialization and flakes development shell ..."
124+
run: "./test/tests.sh ghc966 hix"
125125

126126
# template:
127127
# runs-on: [self-hosted, linux]
128128
# steps:
129129
# - uses: actions/checkout@v4
130-
# - name: "Run tests with ghc8107: End-2-end test of hix project initialization and flakes development shell ..."
131-
# run: "./test/tests.sh ghc8107 template"
130+
# - name: "Run tests with ghc966: End-2-end test of hix project initialization and flakes development shell ..."
131+
# run: "./test/tests.sh ghc966 template"
132132

133133
docs:
134134
runs-on: [self-hosted, linux]
135135
steps:
136136
- uses: actions/checkout@v4
137137
- name: "Test examples in documentation ..."
138-
run: "./test/tests.sh ghc8107 docs"
138+
run: "./test/tests.sh ghc966 docs"
139139

140140
hydra-ifdLevel-0-and-1:
141141
runs-on: [self-hosted, linux]
@@ -178,9 +178,9 @@ jobs:
178178
runs-on: [self-hosted, linux]
179179
steps:
180180
- uses: actions/checkout@v4
181-
- name: "Check closure size with ghc8107"
181+
- name: "Check closure size with ghc966"
182182
run: |
183-
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8107 -o check-closure-size.sh
183+
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc966 -o check-closure-size.sh
184184
echo "+++ Closure size (MB)"
185185
./check-closure-size.sh
186186
@@ -208,7 +208,7 @@ jobs:
208208
- uses: actions/checkout@v4
209209
- name: "Make sure non store paths like can be used as src"
210210
run: |
211-
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
211+
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc966 -o check-path-support.sh
212212
./check-path-support.sh
213213
214214
haskell-nix-roots-do-not-require-IFDs:
@@ -218,12 +218,12 @@ jobs:
218218
- name: "Check that the haskell.nix roots do not require IFDs"
219219
run: nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false
220220

221-
hydra-without-remote-builders-ghc8107:
221+
hydra-without-remote-builders-ghc966:
222222
runs-on: [self-hosted, linux]
223223
steps:
224224
- uses: actions/checkout@v4
225225
- name: "Check that evaluation of hydra jobs works without using remote builders for GHC 8.10.7"
226-
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc8107-native --show-trace --builders ''
226+
run: nix path-info --derivation .#requiredJobs.x86_64-darwin.required-unstable-ghc966-native --show-trace --builders ''
227227

228228
hydra-without-remote-builders-ghc9101:
229229
runs-on: [self-hosted, linux]

changelog.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
This file contains a summary of changes to Haskell.nix and `nix-tools`
22
that will impact users.
33

4+
## Jan 29, 2024
5+
6+
Removed GHC <9.6 from CI.
7+
8+
The latest `nixpkgs-unstable` cause problems with
9+
* GHC 8.10.7
10+
* GHC 9.6.6 mingwW64 (ucrt64 works still as does mingwW64
11+
with newer GHC versions)
12+
413
## Sep 17, 2024
514

615
Cabal projects now use the more granular Unit IDs from plan.json

ci.nix

+6-12
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818

1919
# short names for nixpkgs versions
2020
nixpkgsVersions = {
21-
"R2205" = inputs.nixpkgs-2205;
22-
"R2211" = inputs.nixpkgs-2211;
23-
"R2305" = inputs.nixpkgs-2305;
24-
"R2311" = inputs.nixpkgs-2311;
25-
"R2405" = inputs.nixpkgs-2405;
21+
"R2411" = inputs.nixpkgs-2411;
2622
"unstable" = inputs.nixpkgs-unstable;
2723
};
2824

@@ -61,13 +57,11 @@
6157
# cabal-install and nix-tools plans. When removing a ghc version
6258
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
6359
# Update supported-ghc-versions.md to reflect any changes made here.
64-
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2405") {
65-
ghc96 = false;
66-
ghc98 = false;
60+
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2411") {
61+
# TODO perhaps these
62+
# ghc96 = false;
63+
# ghc98 = false;
6764
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
68-
ghc810 = true;
69-
ghc92 = false;
70-
ghc94 = false;
7165
ghc96 = true;
7266
ghc98 = true;
7367
ghc98llvm = false;
@@ -91,7 +85,7 @@
9185
inherit (lib.systems.examples) ghcjs;
9286
} // lib.optionalAttrs (
9387
(__match ".*llvm" compiler-nix-name == null)
94-
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928"]) # Including GHC HEAD here because the patches for rts/RtsSymbols.c no longer apply and mingwW64 GHC build fails without them
88+
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc966"]) # Not sure why GHC 9.6.6 TH code now wants `log1pf`
9589
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
9690
inherit (lib.systems.examples) mingwW64;
9791
} // lib.optionalAttrs (nixpkgsName == "unstable"

compiler/ghc/default.nix

+6
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ let
295295
src = haskell-nix.haskellLib.cleanSourceWith {
296296
src = {
297297
outPath = buildPackages.srcOnly {
298+
stdenv = buildPackages.stdenvNoCC;
298299
name = "hadrian";
299300
inherit src;
300301
};
@@ -332,6 +333,11 @@ let
332333
# `-fexternal-dynamic-refs` causes `undefined reference` errors when building GHC cross compiler for windows
333334
+ lib.optionalString (enableRelocatedStaticLibs && targetPlatform.isx86_64 && !targetPlatform.isWindows)
334335
" '*.*.ghc.*.opts += -fexternal-dynamic-refs'"
336+
# With the latest nixpkgs mixing `struct utimbuf` and `struct _utimbuf` causes an error without this
337+
+ lib.optionalString (targetPlatform.isWindows) (
338+
if builtins.compareVersions ghc-version "9.10" >= 0
339+
then " '*.ghc-internal.ghc.*.opts += -optc-Wno-incompatible-pointer-types'"
340+
else " '*.base.ghc.*.opts += -optc-Wno-incompatible-pointer-types'")
335341
# The fact that we need to set this here is pretty idiotic. GHC should figure this out on it's own.
336342
# Either have a runtime flag/setting to disable it or if dlopen fails, remember that it failed and
337343
# fall back to non-dynamic. We only have dynamic linker with musl if host and target arch match.

default.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ let
2727
#
2828
# Manually fetch nixpkgs
2929
nixpkgs =
30-
with lock.nodes.nixpkgs.locked;
30+
with lock.nodes.nixpkgs-unstable.locked;
3131
builtins.fetchTarball {
3232
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
3333
sha256 = narHash;
@@ -94,6 +94,9 @@ self // {
9494
pkgs-2405 = import self.inputs.nixpkgs-2405 (nixpkgsArgs // {
9595
localSystem = { inherit system; };
9696
});
97+
pkgs-2411 = import self.inputs.nixpkgs-2411 (nixpkgsArgs // {
98+
localSystem = { inherit system; };
99+
});
97100
pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // {
98101
localSystem = { inherit system; };
99102
});

docs/reference/supported-ghc-versions.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
The following GHC versions are defined in `haskell.nix` (there is a derivation
44
for each, though not all are cached or tested by CI):
5-
- 8.4.4
6-
- 8.6.{1,2,3,4,5}
7-
- 8.8.{1,2,3,4}
8-
- 8.10.{1,2,3,4,5}
9-
- 9.0.1
10-
- 9.2.1
11-
- 9.2.2
5+
6+
- 9.6.6 (TH is broken in mingwW64, but ucrt64 works)
7+
- 9.8.4
8+
- 9.10.1
9+
- 9.12.1
10+
11+
8.10.7 may still work with older nixpkgs versions, but is broken for
12+
nixpkgs-unstable.
1213

1314
The following table shows the Nixpkgs/GHC versions which are built/cached, and
1415
which of those are further tested. If you use a combination of Nixpkgs version
@@ -21,13 +22,10 @@ really should use an instance of Nixpkgs provided by `haskell.nix` itself.
2122

2223
| Nixpkgs version | Nixpkgs pinning | GHC version | `compiler-nix-name` | Tested in CI? |
2324
|------------------|--------------------|-------------|-----------------------|---------------|
24-
| 22.05 | `nixpkgs-2205` | 8.6.5 | `ghc865` | No |
25-
| 22.05 | `nixpkgs-2205` | 8.10.7 | `ghc8107` | No |
26-
| unstable | `nixpkgs-unstable` | 8.6.5 | `ghc865` | No |
27-
| unstable | `nixpkgs-unstable` | 8.8.4 | `ghc884` | No |
28-
| unstable | `nixpkgs-unstable` | 8.10.7 | `ghc8107` | Yes |
29-
| unstable | `nixpkgs-unstable` | 9.0.2 | `ghc902` | No |
30-
| unstable | `nixpkgs-unstable` | 9.2.4 | `ghc924` | Yes |
25+
| unstable | `nixpkgs-unstable` | 9.6.6 | `ghc96` or `ghc966` | Yes |
26+
| unstable | `nixpkgs-unstable` | 9.8.4 | `ghc98` or `ghc984` | Yes |
27+
| unstable | `nixpkgs-unstable` | 9.10.1 | `ghc910` or `ghc9101` | Yes |
28+
| unstable | `nixpkgs-unstable` | 9.12.1 | `ghc912` or `ghc9121` | Yes |
3129

3230
See [ci.nix](https://github.com/input-output-hk/haskell.nix/blob/master/ci.nix)
3331
for the source of truth about what is built and tested (in the off chance this

0 commit comments

Comments
 (0)