From 50066805ab8781a8613382f812b5a7e450f130a6 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Mon, 26 May 2025 20:07:01 +1200 Subject: [PATCH 01/29] Add nixpkgs-2505 --- ci.nix | 3 ++- default.nix | 3 +++ flake.lock | 29 +++++++++++++++++++++++------ flake.nix | 1 + 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ci.nix b/ci.nix index 42d3ea0f3d..6cee7cda4a 100644 --- a/ci.nix +++ b/ci.nix @@ -19,6 +19,7 @@ # short names for nixpkgs versions nixpkgsVersions = { "R2411" = inputs.nixpkgs-2411; + "R2505" = inputs.nixpkgs-2505; "unstable" = inputs.nixpkgs-unstable; }; @@ -57,7 +58,7 @@ # 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 == "R2411") { + nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) { ghc96 = true; ghc98 = true; ghc910 = true; diff --git a/default.nix b/default.nix index ade481f5cb..c43181eb30 100644 --- a/default.nix +++ b/default.nix @@ -97,6 +97,9 @@ self // { pkgs-2411 = import self.inputs.nixpkgs-2411 (nixpkgsArgs // { localSystem = { inherit system; }; }); + pkgs-2505 = import self.inputs.nixpkgs-2505 (nixpkgsArgs // { + localSystem = { inherit system; }; + }); pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // { localSystem = { inherit system; }; }); diff --git a/flake.lock b/flake.lock index 546ed389d4..317cdeee24 100644 --- a/flake.lock +++ b/flake.lock @@ -436,11 +436,11 @@ }, "nixpkgs-2411": { "locked": { - "lastModified": 1746566971, - "narHash": "sha256-I40weT0FZWth1IEjgR5a0zC9LLyrPwTC0DAQcejtTJE=", + "lastModified": 1748037224, + "narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "209c5b3b0f5cf5b5a7e12ddea59bf19699f97e75", + "rev": "f09dede81861f3a83f7f06641ead34f02f37597f", "type": "github" }, "original": { @@ -450,13 +450,29 @@ "type": "github" } }, + "nixpkgs-2505": { + "locked": { + "lastModified": 1748022455, + "narHash": "sha256-XiE6W4I2cB+b/mYdkdrW70M2KPqj5nY0VHw3+i6duvs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "85464f6a9651821d209a37a90a2f05f1fc981941", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-25.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1746576598, - "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", + "lastModified": 1747958103, + "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", + "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", "type": "github" }, "original": { @@ -515,6 +531,7 @@ "nixpkgs-2311": "nixpkgs-2311", "nixpkgs-2405": "nixpkgs-2405", "nixpkgs-2411": "nixpkgs-2411", + "nixpkgs-2505": "nixpkgs-2505", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" diff --git a/flake.nix b/flake.nix index 017d695555..12f31554a9 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; }; nixpkgs-2405 = { url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; }; nixpkgs-2411 = { url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; }; + nixpkgs-2505 = { url = "github:NixOS/nixpkgs/nixpkgs-25.05-darwin"; }; nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; }; "hls-1.10" = { url = "github:haskell/haskell-language-server/1.10.0.0"; flake = false; }; From 13c50f1967f741c89cb5920d135e9e497a66590f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 27 May 2025 14:41:06 +1200 Subject: [PATCH 02/29] Fix EM_CACHE issue --- builder/comp-builder.nix | 4 ++++ compiler/ghc/default.nix | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index 60bce48716..ea9a1f05bd 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -447,6 +447,10 @@ let (lib.optionalString stdenv.hostPlatform.isGhcjs '' export HOME=$(mktemp -d) export EM_CACHE=$(mktemp -d) + if [ -d ${pkgsBuildBuild.emscripten}/share/emscripten/cache ]; then + cp -r ${pkgsBuildBuild.emscripten}/share/emscripten/cache/* $EM_CACHE/ + chmod +w -R $EM_CACHE + fi '') + (lib.optionalString (!canCleanSource) '' echo "Cleaning component source not supported, leaving it un-cleaned" diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 4189884671..3b414eac98 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -435,6 +435,10 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { '' ) + '' export EM_CACHE=$(mktemp -d) + if [ -d ${targetCC}/share/emscripten/cache ]; then + cp -r ${targetCC}/share/emscripten/cache/* $EM_CACHE/ + chmod +w -R $EM_CACHE + fi mv config.sub.ghcjs config.sub '') # GHC is a bit confused on its cross terminology, as these would normally be From 5b078ca27278bae41ed00a3d9856ac747e025cc4 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 May 2025 00:11:13 +1200 Subject: [PATCH 03/29] fix ghcjs --- compiler/ghc/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/ghc/default.nix b/compiler/ghc/default.nix index 3b414eac98..9d31c197cf 100644 --- a/compiler/ghc/default.nix +++ b/compiler/ghc/default.nix @@ -422,9 +422,9 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec { export CXX="${targetCC}/bin/em++" export LD="${targetCC}/bin/emcc" '' + ( - # Including AR and RANLIB here breaks tests.js-template-haskell for GHC 9.6 + # Including AR and RANLIB here breaks tests.js-template-haskell for GHC <9.12 # `LLVM ERROR: malformed uleb128, extends past end` - if builtins.compareVersions ghc-version "9.8" >= 0 + if builtins.compareVersions ghc-version "9.12" >= 0 then '' export AR="${targetCC}/bin/emar" export NM="${targetCC}/share/emscripten/emnm" From aab58c009d9ced08e22a0a9987ba43b41f148f66 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 May 2025 20:58:31 +1200 Subject: [PATCH 04/29] Update ghc913 --- lazy-inputs/ghc913/flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lazy-inputs/ghc913/flake.lock b/lazy-inputs/ghc913/flake.lock index 15c5acd8a1..d73af49a22 100644 --- a/lazy-inputs/ghc913/flake.lock +++ b/lazy-inputs/ghc913/flake.lock @@ -3,11 +3,11 @@ "ghc913": { "flake": false, "locked": { - "lastModified": 1735577639, - "narHash": "sha256-sGNckeL3B6Iw+3wawRjgFEXo/dLiyKAtnbFxY9tX6Qg=", + "lastModified": 1748027596, + "narHash": "sha256-5WU40R26lwl0lRTkEnWui8CEikZ9gRnbiOa4aw/GbI4=", "ref": "refs/heads/master", - "rev": "278a53ee698d961d97afb60be9db2d8bf60b4074", - "revCount": 67713, + "rev": "17db44c5b32fff82ea988fa4f1a233d1a27bdf57", + "revCount": 68114, "submodules": true, "type": "git", "url": "https://gitlab.haskell.org/ghc/ghc" From bca3852c5b2893282ddabf0dbd1cd7e7a4c3e784 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 28 May 2025 21:03:06 +1200 Subject: [PATCH 05/29] Disable ghc 9.10.2 js backend --- ci.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci.nix b/ci.nix index 6cee7cda4a..59048f89c4 100644 --- a/ci.nix +++ b/ci.nix @@ -78,10 +78,10 @@ let lib = nixpkgs.lib; in lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) - && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) - || (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) - || (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc967" "ghc96720250227" "ghc982" "ghc983" "ghc984"]) - || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc967" "ghc96720250227" "ghc982" "ghc983" "ghc984"]) + && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc9102"]) + || (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc9102"]) + || (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc9102"]) + || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc9102"]) )) { inherit (lib.systems.examples) ghcjs; } // lib.optionalAttrs (nixpkgsName == "unstable" From f92d021fff4830c74d97a0762ebeb7904112cb0f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 29 May 2025 20:16:26 +1200 Subject: [PATCH 06/29] Update supported-languages.nix --- lib/supported-languages.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/supported-languages.nix b/lib/supported-languages.nix index ee5ba8f194..0e459c0505 100644 --- a/lib/supported-languages.nix +++ b/lib/supported-languages.nix @@ -312,5 +312,11 @@ evalPackages.writeTextFile { NoMultilineStrings NamedDefaults NoNamedDefaults + '' + + pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.13" >=0) '' + ExplicitLevelImports + ImplicitStagePersistence + NoExplicitLevelImports + NoImplicitStagePersistence ''}''; } From d9a27693414327a6c9c1c43cf2fa6504d01e2b1a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 30 May 2025 13:30:06 +1200 Subject: [PATCH 07/29] Bump head.hackage --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 699d5493e7..dba73c51ed 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -23,7 +23,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-ch17nc6wY2lr94j1+MULW7GuwtgQ8vz56yuPSADMmB8= + --sha256: sha256-tlgDRPY2rZHVvhtGoVgGBDfc/e21GbiLpDF0BwmGGWc= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b From 2bb5206a7731434aec786a3eb4755c76f450586a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 4 Jun 2025 16:01:33 +1200 Subject: [PATCH 08/29] Fix for GHC HEAD --- test/cabal.project.local | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index dba73c51ed..12aca002a7 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -9,8 +9,7 @@ if impl(ghc > 9.13) allow-newer: *:containers, *:time, *:ghc-bignum constraints: base-compat >=0.14.0, aeson >=2.2.1.0 -- From https://ghc.gitlab.haskell.org/head.hackage/cabal.constraints - constraints: extra ==1.7.14 - constraints: base-orphans <0.9.3 || >0.9.3 + -- Nothing needed right now -- This prevents hsc2hs from causing old versions of packages from being added to plan.json allow-newer: hsc2hs:* From cff442f68464f1df7b18329851d3f2929da88d97 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Wed, 4 Jun 2025 16:05:31 +1200 Subject: [PATCH 09/29] Bump head.hackage --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index 12aca002a7..d28c36dfd3 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -22,7 +22,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-tlgDRPY2rZHVvhtGoVgGBDfc/e21GbiLpDF0BwmGGWc= + --sha256: sha256-nwqygXhsJXgEgyryxw0P2MAU0BFFT0zdpHh1XFaglOM= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b From 3077d0be0eb4831b0de38d8a77392fb3c1a309ae Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 00:09:06 +1200 Subject: [PATCH 10/29] Disable static libraries for GHCJS --- modules/component-options.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/component-options.nix b/modules/component-options.nix index 4900e9d8d2..3fbc3cf803 100644 --- a/modules/component-options.nix +++ b/modules/component-options.nix @@ -1,4 +1,4 @@ -{ lib, haskellLib, ... }: +{ pkgs, lib, haskellLib, ... }: { options = { buildable = lib.mkOption { @@ -104,7 +104,8 @@ enableStatic = lib.mkOption { description = "If set, enables building static libraries and executables."; type = lib.types.bool; - default = true; + # Disabled for ghcjs, see https://gitlab.haskell.org/ghc/ghc/-/issues/23235 + default = !pkgs.stdenv.hostPlatform.isGhcjs; }; enableShared = lib.mkOption { From f53095623c51e7ace98754b3b6fff5f9bd27091f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 00:49:34 +1200 Subject: [PATCH 11/29] Update nixpkgs pins --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 4b3fa3ecb9..2d3e9d5211 100644 --- a/flake.lock +++ b/flake.lock @@ -452,11 +452,11 @@ }, "nixpkgs-2505": { "locked": { - "lastModified": 1748022455, - "narHash": "sha256-XiE6W4I2cB+b/mYdkdrW70M2KPqj5nY0VHw3+i6duvs=", + "lastModified": 1748852332, + "narHash": "sha256-r/wVJWmLYEqvrJKnL48r90Wn9HWX9SHFt6s4LhuTh7k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "85464f6a9651821d209a37a90a2f05f1fc981941", + "rev": "a8167f3cc2f991dd4d0055746df53dae5fd0c953", "type": "github" }, "original": { @@ -468,11 +468,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1747958103, - "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", + "lastModified": 1748856973, + "narHash": "sha256-RlTsJUvvr8ErjPBsiwrGbbHYW8XbB/oek0Gi78XdWKg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1", + "rev": "e4b09e47ace7d87de083786b404bf232eb6c89d8", "type": "github" }, "original": { From 19bdc78122a07449db03d89a809902b9cb6b4645 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 08:50:12 +1200 Subject: [PATCH 12/29] Fix missing `pkgs` arg --- modules/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/package.nix b/modules/package.nix index 6a68a6bf78..39d9b2809f 100644 --- a/modules/package.nix +++ b/modules/package.nix @@ -10,7 +10,7 @@ let componentType = types.submodule [ ./component.nix - { _module.args = { inherit haskellLib; }; } + { _module.args = { inherit pkgs haskellLib; }; } # pass down common options as default values ({ lib, options, ... }: lib.mkDefault (lib.filterAttrs (n: _v: builtins.hasAttr n options) config)) ]; From 68e237caf5a180945b6ddecf1178a151193a7b3c Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 11:07:22 +1200 Subject: [PATCH 13/29] nix flake update iserv-proxy --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 2d3e9d5211..320857b923 100644 --- a/flake.lock +++ b/flake.lock @@ -372,11 +372,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1747047742, - "narHash": "sha256-PCDULyZSIPdDdF8Lanbcy+Dl6AJ5z6H2ng3sRsv+gwc=", + "lastModified": 1749078381, + "narHash": "sha256-TIWBMEFBY+o4vdciRUTLB5EOJRGz0MU1spkx4Wl+nWQ=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "dea34de4bde325aca22472c18d659bee7800b477", + "rev": "05a87bf1ed78bb334701b90638d23da474f017ed", "type": "github" }, "original": { From a213a0bd3c51e40a213986b8d1dd67b3db1f08f2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 11:14:09 +1200 Subject: [PATCH 14/29] nix flake update iserv-proxy --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 320857b923..8b9429b7ca 100644 --- a/flake.lock +++ b/flake.lock @@ -372,11 +372,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1749078381, - "narHash": "sha256-TIWBMEFBY+o4vdciRUTLB5EOJRGz0MU1spkx4Wl+nWQ=", + "lastModified": 1749078611, + "narHash": "sha256-18kdF1eB17qc1Fm3D3FisGbRPgwEqCy1A17/91cvDyA=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "05a87bf1ed78bb334701b90638d23da474f017ed", + "rev": "832b56c0ea37d8d372c2fddd879acd2f818d6818", "type": "github" }, "original": { From 936fa02d2e9046b4a56cd141f531881562c9d0d1 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 15:42:37 +1200 Subject: [PATCH 15/29] Fix fatal error: 'rts/Types.h' file not found --- overlays/bootstrap.nix | 3 +++ overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index a57d60a187..5fe966e4ac 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -331,6 +331,9 @@ in { ++ onAndroid (from "9.6" ./patches/ghc/ghc-9.6-COMPAT_R_ARM_PREL31.patch) ++ onAndroid (from "9.10" ./patches/ghc/ghc-9.10-ignore-libc.patch) + + # Fix for `fatal error: 'rts/Types.h' file not found` when building `primitive` + ++ onGhcjs (from "9.13" ./patches/ghc/ghc-9.13-ghcjs-rts-types.patch) ; in ({ ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc { diff --git a/overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch b/overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch new file mode 100644 index 0000000000..652e549f3c --- /dev/null +++ b/overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch @@ -0,0 +1,12 @@ +diff --git a/rts/rts.cabal b/rts/rts.cabal +index 899e65d712..84dac99f54 100644 +--- a/rts/rts.cabal ++++ b/rts/rts.cabal +@@ -160,6 +160,7 @@ library + stg/MachRegs/x86.h + stg/MachRegsForHost.h + stg/Types.h ++ rts/Types.h + + else + -- If we are using an in-tree libffi then we must declare it as a bundled From 3abc61f948dba10b195a235d819ae94f29a0c59f Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 15:51:36 +1200 Subject: [PATCH 16/29] Run CI for GHC 9.10.2 JS --- ci.nix | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ci.nix b/ci.nix index 59048f89c4..89819fa666 100644 --- a/ci.nix +++ b/ci.nix @@ -77,12 +77,7 @@ # of 'lib.systems.examples' are not understood between all versions let lib = nixpkgs.lib; in lib.optionalAttrs (nixpkgsName == "unstable" - && (__match ".*llvm" compiler-nix-name == null) - && ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc9102"]) - || (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc9102"]) - || (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc9102"]) - || (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc9102"]) - )) { + && (__match ".*llvm" compiler-nix-name == null)) { inherit (lib.systems.examples) ghcjs; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) From b8296e39ecda85b6b0fdc73b797ccf3060d3dc78 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 16:44:24 +1200 Subject: [PATCH 17/29] Disable broken tests --- test/th-dlls/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index 8ee93eea0f..e5ba96d035 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -41,7 +41,7 @@ in recurseIntoAttrs { build-ei = packages-ei.th-dlls.components.library; just-template-haskell-ei = packages-ei.th-dlls.components.exes.just-template-haskell; } // optionalAttrs - (!(builtins.elem compiler-nix-name ["ghc984" "ghc9121" "ghc912120241215" "ghc91320241230" "ghc912120250219"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { + (!(builtins.elem compiler-nix-name ["ghc984" "ghc9122" "ghc91320250523"] && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)) { # On for aarch64 cross compile on GHC this test is fails sometimes for non profiled builds # (and always for the profiled builds). # This may be related to the memory allocation changes made in 9.8.4 that From 187555b5629a4bfa8b91e1913d764907f01cb15b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 16:59:29 +1200 Subject: [PATCH 18/29] Disable broken test --- test/plugin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/plugin/default.nix b/test/plugin/default.nix index ae64225d96..3de0bc1b70 100644 --- a/test/plugin/default.nix +++ b/test/plugin/default.nix @@ -19,8 +19,8 @@ in recurseIntoAttrs { }; # Not sure why this breaks for ghc 8.10.7 - meta.disabled = compiler-nix-name == "ghc8107" - || builtins.elem compiler-nix-name [ "ghc9121" "ghc912120241215" "ghc91320241230" ] + meta.disabled = + builtins.elem compiler-nix-name [ "ghc91320250523" ] || stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isGhcjs || stdenv.hostPlatform.isWindows From 15e0e0d90169847ebd49c5f19508436b8ccbfef2 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 18:18:59 +1200 Subject: [PATCH 19/29] Bump head.hackage --- test/cabal.project.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal.project.local b/test/cabal.project.local index d28c36dfd3..d3e73d819b 100644 --- a/test/cabal.project.local +++ b/test/cabal.project.local @@ -22,7 +22,7 @@ repository head.hackage.ghc.haskell.org f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89 26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d - --sha256: sha256-nwqygXhsJXgEgyryxw0P2MAU0BFFT0zdpHh1XFaglOM= + --sha256: sha256-Zu+OsPXt+tUllxC2LVJ3jneYGUH5GvdemZZPnynWaN0= repository ghcjs-overlay url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b From 2e314ded48b98d8c7c6a360cee801e09ffe92993 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 21:35:16 +1200 Subject: [PATCH 20/29] Don't run CI for GHC 9.10.2 JS --- ci.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 89819fa666..4f20bc44e0 100644 --- a/ci.nix +++ b/ci.nix @@ -77,7 +77,8 @@ # of 'lib.systems.examples' are not understood between all versions let lib = nixpkgs.lib; in lib.optionalAttrs (nixpkgsName == "unstable" - && (__match ".*llvm" compiler-nix-name == null)) { + && (__match ".*llvm" compiler-nix-name == null) + && !builtins.elem compiler-nix-name ["ghc9102"]) { inherit (lib.systems.examples) ghcjs; } // lib.optionalAttrs (nixpkgsName == "unstable" && (__match ".*llvm" compiler-nix-name == null) From 2dae8355177b067670111469ebe16cd3f61098dd Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Thu, 5 Jun 2025 21:46:53 +1200 Subject: [PATCH 21/29] Fix debug info check --- test/cabal-simple-debug/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cabal-simple-debug/default.nix b/test/cabal-simple-debug/default.nix index 7b02425276..58d7aab01f 100644 --- a/test/cabal-simple-debug/default.nix +++ b/test/cabal-simple-debug/default.nix @@ -39,7 +39,7 @@ in recurseIntoAttrs { else '' (${dwarfdump}/bin/dwarfdump $exe || true) | grep -c 'libraries/base/[A-Za-z0-9/]*\.hs' ''} - (${dwarfdump}/bin/dwarfdump $exe || true) | grep -c '/Main\.hs' + (${dwarfdump}/bin/dwarfdump $exe || true) | grep -c 'Main\.hs' touch $out ''; From bbb69ce231d48d37933104738c57871d3314525b Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 00:09:12 +1200 Subject: [PATCH 22/29] Drop nixpkgs-2411 from CI --- ci.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ci.nix b/ci.nix index 4f20bc44e0..2b577a7994 100644 --- a/ci.nix +++ b/ci.nix @@ -18,7 +18,6 @@ # short names for nixpkgs versions nixpkgsVersions = { - "R2411" = inputs.nixpkgs-2411; "R2505" = inputs.nixpkgs-2505; "unstable" = inputs.nixpkgs-unstable; }; @@ -44,6 +43,12 @@ "libdwarf-20181024" "dwarfdump-20181024" ]; + allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + "android-sdk-ndk" + "android-sdk-platform-tools" + "aarch64-unknown-linux-android-ndk-toolchain-wrapper" + "aarch64-unknown-linux-android-ndk-toolchain" + ]; }; }; @@ -97,7 +102,7 @@ } // lib.optionalAttrs (__match ".*llvm" compiler-nix-name == null && system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { # Out llvm versions of GHC seem to break for musl32 inherit (lib.systems.examples) musl32; - } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "R2411" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { + } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { inherit (lib.systems.examples) aarch64-android-prebuilt armv7a-android-prebuilt; } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { # TODO fix this for the compilers we build with hadrian (ghc >=9.4) From bc7efb5e1837779afc7703cc87c9c938fe0b1a48 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 09:38:04 +1200 Subject: [PATCH 23/29] Fix for armv7a-android --- ci.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci.nix b/ci.nix index 2b577a7994..7e8015bb1d 100644 --- a/ci.nix +++ b/ci.nix @@ -48,6 +48,8 @@ "android-sdk-platform-tools" "aarch64-unknown-linux-android-ndk-toolchain-wrapper" "aarch64-unknown-linux-android-ndk-toolchain" + "armv7a-unknown-linux-androideabi-ndk-toolchain-wrapper" + "armv7a-unknown-linux-androideabi-ndk-toolchain" ]; }; }; From 29a085a92287f09fa592333ae4309709aa0e2cfa Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 09:58:24 +1200 Subject: [PATCH 24/29] Fix dynamic link check for darwin --- test/cabal-22/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cabal-22/default.nix b/test/cabal-22/default.nix index ddbb51a63d..12345a395c 100644 --- a/test/cabal-22/default.nix +++ b/test/cabal-22/default.nix @@ -37,7 +37,7 @@ in recurseIntoAttrs { '' + # Aarch is statically linked and does not produce a .so file. # Musl is also statically linked, but it does make a .so file so we should check that still. - optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64) ('' + optionalString (!stdenv.hostPlatform.isAarch32 && !stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isDarwin) ('' printf "checking that executable is dynamically linked to system libraries... " >& 2 '' + optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) '' ${haskellLib.lddForTests} $exe | grep 'libc[.]so' @@ -57,7 +57,7 @@ in recurseIntoAttrs { '' + optionalString stdenv.isLinux '' ${haskellLib.lddForTests} $sofile | grep libHSghc-prim '' + optionalString stdenv.isDarwin '' - otool -L $sofile | grep libHSghc-prim + otool -L $sofile | grep libHSghc- '')) + '' touch $out From d2d9795b1c9e92f385c345c23eba860f24203e80 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 10:27:24 +1200 Subject: [PATCH 25/29] nix flake update iserv-proxy --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 5d04549bb2..f3b98a5841 100644 --- a/flake.lock +++ b/flake.lock @@ -372,11 +372,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1749078611, - "narHash": "sha256-18kdF1eB17qc1Fm3D3FisGbRPgwEqCy1A17/91cvDyA=", + "lastModified": 1749162393, + "narHash": "sha256-QTVOa67FNxlk3uzVmHahzok+RZfk59UQ+kHWaUKqhNE=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "832b56c0ea37d8d372c2fddd879acd2f818d6818", + "rev": "c38db6f28808cf893ef8d391313c7d0d26ed9528", "type": "github" }, "original": { From a33d676512fa478a672ecca15dfa685fff24fa3a Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 10:38:51 +1200 Subject: [PATCH 26/29] Add comment --- test/th-dlls/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index e5ba96d035..b1530223a7 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -22,14 +22,16 @@ in recurseIntoAttrs { meta.disabled = stdenv.hostPlatform.isGhcjs # On aarch64 this test also breaks form musl builds (including cross compiles on x86_64-linux) || (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl) - # Failed to lookup symbol: __aarch64_swp8_acq_rel - || (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) # Not sure why this is failing with a seg fault || (builtins.elem compiler-nix-name ["ghc9102"] && stdenv.hostPlatform.isAndroid && stdenv.hostPlatform.isAarch32) - # We have been unable to get windows cross compilation of th-orphans to work for GHC 8.10 using the latest nixpkgs - || (compiler-nix-name == "ghc8107" && stdenv.hostPlatform.isWindows) # unhandled ELF relocation(Rel) type 10 || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) + + ## Old GHC versions (TODO remove) + # Failed to lookup symbol: __aarch64_swp8_acq_rel + || (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64) + # We have been unable to get windows cross compilation of th-orphans to work for GHC 8.10 using the latest nixpkgs + || (compiler-nix-name == "ghc8107" && stdenv.hostPlatform.isWindows) ; ifdInputs = { From e037b406719d6e547c8d6406df2e5d396c480049 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 14:25:24 +1200 Subject: [PATCH 27/29] nix flake update iserv-proxy --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index f3b98a5841..adb9a3fbc0 100644 --- a/flake.lock +++ b/flake.lock @@ -372,11 +372,11 @@ "iserv-proxy": { "flake": false, "locked": { - "lastModified": 1749162393, - "narHash": "sha256-QTVOa67FNxlk3uzVmHahzok+RZfk59UQ+kHWaUKqhNE=", + "lastModified": 1749176681, + "narHash": "sha256-RLoo84PBSeGKbqMETsU0lEJDnc/oTx0l/TYzCaWqlgc=", "owner": "stable-haskell", "repo": "iserv-proxy", - "rev": "c38db6f28808cf893ef8d391313c7d0d26ed9528", + "rev": "6972fbc49574108cb48723bb94260e3ce17898f7", "type": "github" }, "original": { From c84c7f4bec0188ec4b53e79e99daee8c140b72ad Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 18:20:34 +1200 Subject: [PATCH 28/29] Disable broken tests --- test/th-dlls/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/th-dlls/default.nix b/test/th-dlls/default.nix index b1530223a7..33315dc011 100644 --- a/test/th-dlls/default.nix +++ b/test/th-dlls/default.nix @@ -23,7 +23,7 @@ in recurseIntoAttrs { # On aarch64 this test also breaks form musl builds (including cross compiles on x86_64-linux) || (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl) # Not sure why this is failing with a seg fault - || (builtins.elem compiler-nix-name ["ghc9102"] && stdenv.hostPlatform.isAndroid && stdenv.hostPlatform.isAarch32) + || (builtins.elem compiler-nix-name ["ghc9102" "ghc9102llvm"] && stdenv.hostPlatform.isAndroid && stdenv.hostPlatform.isAarch32) # unhandled ELF relocation(Rel) type 10 || (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) From 6ffde3ebfb4032e043f85c567bfee22d0cbbe2c8 Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Fri, 6 Jun 2025 19:54:58 +1200 Subject: [PATCH 29/29] Skip broken android cross compile --- ci.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci.nix b/ci.nix index 7e8015bb1d..e07482ba5e 100644 --- a/ci.nix +++ b/ci.nix @@ -105,7 +105,9 @@ # Out llvm versions of GHC seem to break for musl32 inherit (lib.systems.examples) musl32; } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) { - inherit (lib.systems.examples) aarch64-android-prebuilt armv7a-android-prebuilt; + inherit (lib.systems.examples) aarch64-android-prebuilt; + } // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) { + inherit (lib.systems.examples) armv7a-android-prebuilt; } // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) { # TODO fix this for the compilers we build with hadrian (ghc >=9.4) inherit (lib.systems.examples) aarch64-multiplatform-musl;