Skip to content

Add nixpkgs-2505 #2377

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 32 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5006680
Add nixpkgs-2505
hamishmack May 26, 2025
13c50f1
Fix EM_CACHE issue
hamishmack May 27, 2025
5b078ca
fix ghcjs
hamishmack May 27, 2025
aab58c0
Update ghc913
hamishmack May 28, 2025
bca3852
Disable ghc 9.10.2 js backend
hamishmack May 28, 2025
1ce7490
Merge branch 'master' into hkm/nixpkgs-2505
hamishmack May 29, 2025
f92d021
Update supported-languages.nix
hamishmack May 29, 2025
02077ca
Merge remote-tracking branch 'origin/master' into hkm/nixpkgs-2505
hamishmack May 29, 2025
d9a2769
Bump head.hackage
hamishmack May 30, 2025
2bb5206
Fix for GHC HEAD
hamishmack Jun 4, 2025
cff442f
Bump head.hackage
hamishmack Jun 4, 2025
3077d0b
Disable static libraries for GHCJS
hamishmack Jun 4, 2025
f530956
Update nixpkgs pins
hamishmack Jun 4, 2025
19bdc78
Fix missing `pkgs` arg
hamishmack Jun 4, 2025
68e237c
nix flake update iserv-proxy
hamishmack Jun 4, 2025
a213a0b
nix flake update iserv-proxy
hamishmack Jun 4, 2025
936fa02
Fix fatal error: 'rts/Types.h' file not found
hamishmack Jun 5, 2025
3abc61f
Run CI for GHC 9.10.2 JS
hamishmack Jun 5, 2025
b8296e3
Disable broken tests
hamishmack Jun 5, 2025
187555b
Disable broken test
hamishmack Jun 5, 2025
15e0e0d
Bump head.hackage
hamishmack Jun 5, 2025
bfdf339
Merge remote-tracking branch 'origin/master' into hkm/nixpkgs-2505
hamishmack Jun 5, 2025
2e314de
Don't run CI for GHC 9.10.2 JS
hamishmack Jun 5, 2025
2dae835
Fix debug info check
hamishmack Jun 5, 2025
bbb69ce
Drop nixpkgs-2411 from CI
hamishmack Jun 5, 2025
bc7efb5
Fix for armv7a-android
hamishmack Jun 5, 2025
29a085a
Fix dynamic link check for darwin
hamishmack Jun 5, 2025
d2d9795
nix flake update iserv-proxy
hamishmack Jun 5, 2025
a33d676
Add comment
hamishmack Jun 5, 2025
e037b40
nix flake update iserv-proxy
hamishmack Jun 6, 2025
c84c7f4
Disable broken tests
hamishmack Jun 6, 2025
6ffde3e
Skip broken android cross compile
hamishmack Jun 6, 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
4 changes: 4 additions & 0 deletions builder/comp-builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
24 changes: 15 additions & 9 deletions ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# short names for nixpkgs versions
nixpkgsVersions = {
"R2411" = inputs.nixpkgs-2411;
"R2505" = inputs.nixpkgs-2505;
"unstable" = inputs.nixpkgs-unstable;
};

Expand All @@ -43,6 +43,14 @@
"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"
"armv7a-unknown-linux-androideabi-ndk-toolchain-wrapper"
"armv7a-unknown-linux-androideabi-ndk-toolchain"
];
};
};

Expand All @@ -57,7 +65,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;
Expand All @@ -77,11 +85,7 @@
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"])
)) {
&& !builtins.elem compiler-nix-name ["ghc9102"]) {
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (nixpkgsName == "unstable"
&& (__match ".*llvm" compiler-nix-name == null)
Expand All @@ -100,8 +104,10 @@
} // 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"]) {
inherit (lib.systems.examples) aarch64-android-prebuilt armv7a-android-prebuilt;
} // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
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;
Expand Down
8 changes: 6 additions & 2 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
});
Expand Down
35 changes: 26 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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; };
Expand Down
8 changes: 4 additions & 4 deletions lazy-inputs/ghc913/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/supported-languages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -312,5 +312,11 @@ evalPackages.writeTextFile {
NoMultilineStrings
NamedDefaults
NoNamedDefaults
''
+ pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.13" >=0) ''
ExplicitLevelImports
ImplicitStagePersistence
NoExplicitLevelImports
NoImplicitStagePersistence
''}'';
}
5 changes: 3 additions & 2 deletions modules/component-options.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, haskellLib, ... }:
{ pkgs, lib, haskellLib, ... }:
{
options = {
buildable = lib.mkOption {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion modules/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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))
];
Expand Down
3 changes: 3 additions & 0 deletions overlays/bootstrap.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions overlays/patches/ghc/ghc-9.13-ghcjs-rts-types.patch
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions test/cabal-22/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/cabal-simple-debug/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
'';
Expand Down
5 changes: 2 additions & 3 deletions test/cabal.project.local
Original file line number Diff line number Diff line change
Expand Up @@ -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:*
Expand All @@ -23,7 +22,7 @@ repository head.hackage.ghc.haskell.org
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
--sha256: sha256-ch17nc6wY2lr94j1+MULW7GuwtgQ8vz56yuPSADMmB8=
--sha256: sha256-Zu+OsPXt+tUllxC2LVJ3jneYGUH5GvdemZZPnynWaN0=

repository ghcjs-overlay
url: https://raw.githubusercontent.com/input-output-hk/hackage-overlay-ghcjs/ffb32dce467b9a4d27be759fdd2740a6edd09d0b
Expand Down
4 changes: 2 additions & 2 deletions test/plugin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions test/th-dlls/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
# Not sure why this is failing with a seg fault
|| (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)

## 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)
# 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)
;

ifdInputs = {
Expand All @@ -41,7 +43,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
Expand Down
Loading