Skip to content

Add nixpkgs-2411 and update other nixpkgs pins #2307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1487a69
Add nixpkgs-2411 and update other nixpkgs pins
hamishmack Jan 20, 2025
087fed6
Avoid broken nixpkgs ghc 9.0.2 (use 9.6.4 when present)
hamishmack Jan 21, 2025
5b8608c
Relax version check
hamishmack Jan 21, 2025
7d3f24b
Fix for ghc 9.10.1
hamishmack Jan 21, 2025
57db6ef
Stick with ghc 8.10.7 for old versions of alex and happy
hamishmack Jan 21, 2025
277b592
Fix for GHC 8.10.7
hamishmack Jan 21, 2025
003ea69
Fix warning from srcOnly
hamishmack Jan 21, 2025
048396a
Merge remote-tracking branch 'origin/master' into hkm/nixpkgs-update
hamishmack Jan 21, 2025
7b4cfe0
Avoid https://gitlab.haskell.org/ghc/ghc/-/issues/25608
hamishmack Jan 21, 2025
3da5533
Only patch rcodesign 0.22.0
hamishmack Jan 21, 2025
1297ba0
ifdLevel 1
hamishmack Jan 21, 2025
cee5406
Remove ghc boot tools from roots (having ghc in roots should be enough)
hamishmack Jan 21, 2025
3ed2d17
Add missing casts
hamishmack Nov 28, 2024
5150d70
Fix for windows cross compilation
hamishmack Jan 21, 2025
cb6f1de
Fix for windows cross compilation
hamishmack Jan 21, 2025
9788b83
is_io_mng_native_p is in RtsFlags.h for older versions of GHC
hamishmack Jan 21, 2025
cd556c0
Fix for windows cross compilation
hamishmack Jan 22, 2025
44065a9
ifdLevel 2
hamishmack Jan 22, 2025
7dea022
ifdLevel 3
hamishmack Jan 22, 2025
6348d94
Fix HsOpenSSL tests
hamishmack Jan 24, 2025
2e68295
Fix HsOpenSSL tests
hamishmack Jan 24, 2025
9a3a276
Fix HsOpenSSL tests
hamishmack Jan 24, 2025
eea3e69
Drop ghc 8.10 from ci
hamishmack Jan 27, 2025
2115890
Drop mingwW64 from ci
hamishmack Jan 27, 2025
8e3f39e
Skip flaky test
hamishmack Jan 27, 2025
f1e5456
Add mingwW64 back into ci (but not GHC 9.6.6)
hamishmack Jan 28, 2025
59ba332
Drop GHC <9.6 from CI
hamishmack Jan 29, 2025
ab45034
Remove unused hydra input
hamishmack Jan 29, 2025
40c7827
Merge remote-tracking branch 'origin/master' into hkm/nixpkgs-update
hamishmack Jan 29, 2025
75c26bf
Use ghc 9.6.6 for github tests
hamishmack Jan 31, 2025
4f2a27e
Use nixpkgs-unstable directly (instead of via `follows`) in default.nix
hamishmack Feb 2, 2025
e3a18a4
Update shell-for test to use IFD
hamishmack Feb 2, 2025
198a7a2
Update shell-for test to use IFD
hamishmack Feb 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 39 additions & 39 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Run tests with ghc8107"
name: "Run tests with ghc966"

on:
pull_request:
Expand All @@ -22,120 +22,120 @@ jobs:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Run tests with ghc8107: Running the nix-build tests..."
run: "./test/tests.sh ghc8107 nix-build"
- name: "Run tests with ghc966: Running the nix-build tests..."
run: "./test/tests.sh ghc966 nix-build"

unit-tests:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Run tests with ghc8107: Running the unit tests..."
run: "./test/tests.sh ghc8107 unit-tests"
- name: "Run tests with ghc966: Running the unit tests..."
run: "./test/tests.sh ghc966 unit-tests"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

docs:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Test examples in documentation ..."
run: "./test/tests.sh ghc8107 docs"
run: "./test/tests.sh ghc966 docs"

hydra-ifdLevel-0-and-1:
runs-on: [self-hosted, linux]
Expand Down Expand Up @@ -178,9 +178,9 @@ jobs:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- name: "Check closure size with ghc8107"
- name: "Check closure size with ghc966"
run: |
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8107 -o check-closure-size.sh
nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc966 -o check-closure-size.sh
echo "+++ Closure size (MB)"
./check-closure-size.sh

Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
- uses: actions/checkout@v4
- name: "Make sure non store paths like can be used as src"
run: |
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8107 -o check-path-support.sh
nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc966 -o check-path-support.sh
./check-path-support.sh

haskell-nix-roots-do-not-require-IFDs:
Expand All @@ -218,12 +218,12 @@ jobs:
- name: "Check that the haskell.nix roots do not require IFDs"
run: nix build .#roots.x86_64-linux --accept-flake-config --option allow-import-from-derivation false

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

hydra-without-remote-builders-ghc9101:
runs-on: [self-hosted, linux]
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
This file contains a summary of changes to Haskell.nix and `nix-tools`
that will impact users.

## Jan 29, 2024

Removed GHC <9.6 from CI.

The latest `nixpkgs-unstable` cause problems with
* GHC 8.10.7
* GHC 9.6.6 mingwW64 (ucrt64 works still as does mingwW64
with newer GHC versions)

## Sep 17, 2024

Cabal projects now use the more granular Unit IDs from plan.json
Expand Down
18 changes: 6 additions & 12 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@

# short names for nixpkgs versions
nixpkgsVersions = {
"R2205" = inputs.nixpkgs-2205;
"R2211" = inputs.nixpkgs-2211;
"R2305" = inputs.nixpkgs-2305;
"R2311" = inputs.nixpkgs-2311;
"R2405" = inputs.nixpkgs-2405;
"R2411" = inputs.nixpkgs-2411;
"unstable" = inputs.nixpkgs-unstable;
};

Expand Down Expand Up @@ -61,13 +57,11 @@
# cabal-install and nix-tools plans. When removing a ghc version
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
# Update supported-ghc-versions.md to reflect any changes made here.
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2405") {
ghc96 = false;
ghc98 = false;
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2411") {
# TODO perhaps these
# ghc96 = false;
# ghc98 = false;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc810 = true;
ghc92 = false;
ghc94 = false;
ghc96 = true;
ghc98 = true;
ghc98llvm = false;
Expand All @@ -91,7 +85,7 @@
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (
(__match ".*llvm" compiler-nix-name == null)
&& ((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
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc966"]) # Not sure why GHC 9.6.6 TH code now wants `log1pf`
|| (system == "x86_64-darwin" && builtins.elem compiler-nix-name []))) { # TODO add ghc versions when we have more darwin build capacity
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (nixpkgsName == "unstable"
Expand Down
6 changes: 6 additions & 0 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ let
src = haskell-nix.haskellLib.cleanSourceWith {
src = {
outPath = buildPackages.srcOnly {
stdenv = buildPackages.stdenvNoCC;
name = "hadrian";
inherit src;
};
Expand Down Expand Up @@ -332,6 +333,11 @@ let
# `-fexternal-dynamic-refs` causes `undefined reference` errors when building GHC cross compiler for windows
+ lib.optionalString (enableRelocatedStaticLibs && targetPlatform.isx86_64 && !targetPlatform.isWindows)
" '*.*.ghc.*.opts += -fexternal-dynamic-refs'"
# With the latest nixpkgs mixing `struct utimbuf` and `struct _utimbuf` causes an error without this
+ lib.optionalString (targetPlatform.isWindows) (
if builtins.compareVersions ghc-version "9.10" >= 0
then " '*.ghc-internal.ghc.*.opts += -optc-Wno-incompatible-pointer-types'"
else " '*.base.ghc.*.opts += -optc-Wno-incompatible-pointer-types'")
# The fact that we need to set this here is pretty idiotic. GHC should figure this out on it's own.
# Either have a runtime flag/setting to disable it or if dlopen fails, remember that it failed and
# fall back to non-dynamic. We only have dynamic linker with musl if host and target arch match.
Expand Down
5 changes: 4 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ let
#
# Manually fetch nixpkgs
nixpkgs =
with lock.nodes.nixpkgs.locked;
with lock.nodes.nixpkgs-unstable.locked;
builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
sha256 = narHash;
Expand Down Expand Up @@ -94,6 +94,9 @@ self // {
pkgs-2405 = import self.inputs.nixpkgs-2405 (nixpkgsArgs // {
localSystem = { inherit system; };
});
pkgs-2411 = import self.inputs.nixpkgs-2411 (nixpkgsArgs // {
localSystem = { inherit system; };
});
pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // {
localSystem = { inherit system; };
});
Expand Down
26 changes: 12 additions & 14 deletions docs/reference/supported-ghc-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

The following GHC versions are defined in `haskell.nix` (there is a derivation
for each, though not all are cached or tested by CI):
- 8.4.4
- 8.6.{1,2,3,4,5}
- 8.8.{1,2,3,4}
- 8.10.{1,2,3,4,5}
- 9.0.1
- 9.2.1
- 9.2.2

- 9.6.6 (TH is broken in mingwW64, but ucrt64 works)
- 9.8.4
- 9.10.1
- 9.12.1

8.10.7 may still work with older nixpkgs versions, but is broken for
nixpkgs-unstable.

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

| Nixpkgs version | Nixpkgs pinning | GHC version | `compiler-nix-name` | Tested in CI? |
|------------------|--------------------|-------------|-----------------------|---------------|
| 22.05 | `nixpkgs-2205` | 8.6.5 | `ghc865` | No |
| 22.05 | `nixpkgs-2205` | 8.10.7 | `ghc8107` | No |
| unstable | `nixpkgs-unstable` | 8.6.5 | `ghc865` | No |
| unstable | `nixpkgs-unstable` | 8.8.4 | `ghc884` | No |
| unstable | `nixpkgs-unstable` | 8.10.7 | `ghc8107` | Yes |
| unstable | `nixpkgs-unstable` | 9.0.2 | `ghc902` | No |
| unstable | `nixpkgs-unstable` | 9.2.4 | `ghc924` | Yes |
| unstable | `nixpkgs-unstable` | 9.6.6 | `ghc96` or `ghc966` | Yes |
| unstable | `nixpkgs-unstable` | 9.8.4 | `ghc98` or `ghc984` | Yes |
| unstable | `nixpkgs-unstable` | 9.10.1 | `ghc910` or `ghc9101` | Yes |
| unstable | `nixpkgs-unstable` | 9.12.1 | `ghc912` or `ghc9121` | Yes |

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