Skip to content

Commit 9e552b1

Browse files
authored
Add nixpkgs-2505 (#2377)
* Add nixpkgs-2505 * Fix EM_CACHE issue * fix ghcjs * Update ghc913 * Disable ghc 9.10.2 js backend * Update supported-languages.nix * Bump head.hackage * Fix for GHC HEAD * Bump head.hackage * Disable static libraries for GHCJS * Update nixpkgs pins * Fix missing `pkgs` arg * nix flake update iserv-proxy * nix flake update iserv-proxy * Fix fatal error: 'rts/Types.h' file not found * Run CI for GHC 9.10.2 JS * Disable broken tests * Disable broken test * Bump head.hackage * Don't run CI for GHC 9.10.2 JS * Fix debug info check * Drop nixpkgs-2411 from CI * Fix for armv7a-android * Fix dynamic link check for darwin * nix flake update iserv-proxy * Add comment * nix flake update iserv-proxy * Disable broken tests * Skip broken android cross compile
1 parent ff3259c commit 9e552b1

File tree

17 files changed

+98
-40
lines changed

17 files changed

+98
-40
lines changed

builder/comp-builder.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,10 @@ let
447447
(lib.optionalString stdenv.hostPlatform.isGhcjs ''
448448
export HOME=$(mktemp -d)
449449
export EM_CACHE=$(mktemp -d)
450+
if [ -d ${pkgsBuildBuild.emscripten}/share/emscripten/cache ]; then
451+
cp -r ${pkgsBuildBuild.emscripten}/share/emscripten/cache/* $EM_CACHE/
452+
chmod +w -R $EM_CACHE
453+
fi
450454
'') +
451455
(lib.optionalString (!canCleanSource) ''
452456
echo "Cleaning component source not supported, leaving it un-cleaned"

ci.nix

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# short names for nixpkgs versions
2020
nixpkgsVersions = {
21-
"R2411" = inputs.nixpkgs-2411;
21+
"R2505" = inputs.nixpkgs-2505;
2222
"unstable" = inputs.nixpkgs-unstable;
2323
};
2424

@@ -43,6 +43,14 @@
4343
"libdwarf-20181024"
4444
"dwarfdump-20181024"
4545
];
46+
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
47+
"android-sdk-ndk"
48+
"android-sdk-platform-tools"
49+
"aarch64-unknown-linux-android-ndk-toolchain-wrapper"
50+
"aarch64-unknown-linux-android-ndk-toolchain"
51+
"armv7a-unknown-linux-androideabi-ndk-toolchain-wrapper"
52+
"armv7a-unknown-linux-androideabi-ndk-toolchain"
53+
];
4654
};
4755
};
4856

@@ -57,7 +65,7 @@
5765
# cabal-install and nix-tools plans. When removing a ghc version
5866
# from here (so that is no longer cached) also remove ./materialized/ghcXXX.
5967
# Update supported-ghc-versions.md to reflect any changes made here.
60-
nixpkgs.lib.optionalAttrs (nixpkgsName == "R2411") {
68+
nixpkgs.lib.optionalAttrs (builtins.elem nixpkgsName ["R2411" "R2505"]) {
6169
ghc96 = true;
6270
ghc98 = true;
6371
ghc910 = true;
@@ -77,11 +85,7 @@
7785
let lib = nixpkgs.lib;
7886
in lib.optionalAttrs (nixpkgsName == "unstable"
7987
&& (__match ".*llvm" compiler-nix-name == null)
80-
&& ((system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"])
81-
|| (system == "aarch64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"])
82-
|| (system == "x86_64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc967" "ghc96720250227" "ghc982" "ghc983" "ghc984"])
83-
|| (system == "aarch64-darwin" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc966" "ghc967" "ghc96720250227" "ghc982" "ghc983" "ghc984"])
84-
)) {
88+
&& !builtins.elem compiler-nix-name ["ghc9102"]) {
8589
inherit (lib.systems.examples) ghcjs;
8690
} // lib.optionalAttrs (nixpkgsName == "unstable"
8791
&& (__match ".*llvm" compiler-nix-name == null)
@@ -100,8 +104,10 @@
100104
} // lib.optionalAttrs (__match ".*llvm" compiler-nix-name == null && system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
101105
# Out llvm versions of GHC seem to break for musl32
102106
inherit (lib.systems.examples) musl32;
103-
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "R2411" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
104-
inherit (lib.systems.examples) aarch64-android-prebuilt armv7a-android-prebuilt;
107+
} // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948"]) {
108+
inherit (lib.systems.examples) aarch64-android-prebuilt;
109+
} // lib.optionalAttrs (system == "x86_64-linux" && !builtins.elem compiler-nix-name ["ghc902" "ghc928" "ghc948" "ghc91320250523"]) {
110+
inherit (lib.systems.examples) armv7a-android-prebuilt;
105111
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && !builtins.elem compiler-nix-name ["ghc8107" "ghc902"]) {
106112
# TODO fix this for the compilers we build with hadrian (ghc >=9.4)
107113
inherit (lib.systems.examples) aarch64-multiplatform-musl;

compiler/ghc/default.nix

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
422422
export CXX="${targetCC}/bin/em++"
423423
export LD="${targetCC}/bin/emcc"
424424
'' + (
425-
# Including AR and RANLIB here breaks tests.js-template-haskell for GHC 9.6
425+
# Including AR and RANLIB here breaks tests.js-template-haskell for GHC <9.12
426426
# `LLVM ERROR: malformed uleb128, extends past end`
427-
if builtins.compareVersions ghc-version "9.8" >= 0
427+
if builtins.compareVersions ghc-version "9.12" >= 0
428428
then ''
429429
export AR="${targetCC}/bin/emar"
430430
export NM="${targetCC}/share/emscripten/emnm"
@@ -435,6 +435,10 @@ haskell-nix.haskellLib.makeCompilerDeps (stdenv.mkDerivation (rec {
435435
''
436436
) + ''
437437
export EM_CACHE=$(mktemp -d)
438+
if [ -d ${targetCC}/share/emscripten/cache ]; then
439+
cp -r ${targetCC}/share/emscripten/cache/* $EM_CACHE/
440+
chmod +w -R $EM_CACHE
441+
fi
438442
mv config.sub.ghcjs config.sub
439443
'')
440444
# GHC is a bit confused on its cross terminology, as these would normally be

default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ self // {
9797
pkgs-2411 = import self.inputs.nixpkgs-2411 (nixpkgsArgs // {
9898
localSystem = { inherit system; };
9999
});
100+
pkgs-2505 = import self.inputs.nixpkgs-2505 (nixpkgsArgs // {
101+
localSystem = { inherit system; };
102+
});
100103
pkgs-unstable = import self.inputs.nixpkgs-unstable (nixpkgsArgs // {
101104
localSystem = { inherit system; };
102105
});

flake.lock

Lines changed: 26 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
nixpkgs-2311 = { url = "github:NixOS/nixpkgs/nixpkgs-23.11-darwin"; };
88
nixpkgs-2405 = { url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin"; };
99
nixpkgs-2411 = { url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin"; };
10+
nixpkgs-2505 = { url = "github:NixOS/nixpkgs/nixpkgs-25.05-darwin"; };
1011
nixpkgs-unstable = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
1112
flake-compat = { url = "github:input-output-hk/flake-compat/hkm/gitlab-fix"; flake = false; };
1213
"hls-1.10" = { url = "github:haskell/haskell-language-server/1.10.0.0"; flake = false; };

lazy-inputs/ghc913/flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/supported-languages.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,5 +312,11 @@ evalPackages.writeTextFile {
312312
NoMultilineStrings
313313
NamedDefaults
314314
NoNamedDefaults
315+
''
316+
+ pkgs.lib.optionalString (builtins.compareVersions ghc.version "9.13" >=0) ''
317+
ExplicitLevelImports
318+
ImplicitStagePersistence
319+
NoExplicitLevelImports
320+
NoImplicitStagePersistence
315321
''}'';
316322
}

modules/component-options.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ lib, haskellLib, ... }:
1+
{ pkgs, lib, haskellLib, ... }:
22
{
33
options = {
44
buildable = lib.mkOption {
@@ -104,7 +104,8 @@
104104
enableStatic = lib.mkOption {
105105
description = "If set, enables building static libraries and executables.";
106106
type = lib.types.bool;
107-
default = true;
107+
# Disabled for ghcjs, see https://gitlab.haskell.org/ghc/ghc/-/issues/23235
108+
default = !pkgs.stdenv.hostPlatform.isGhcjs;
108109
};
109110

110111
enableShared = lib.mkOption {

modules/package.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ let
1010

1111
componentType = types.submodule [
1212
./component.nix
13-
{ _module.args = { inherit haskellLib; }; }
13+
{ _module.args = { inherit pkgs haskellLib; }; }
1414
# pass down common options as default values
1515
({ lib, options, ... }: lib.mkDefault (lib.filterAttrs (n: _v: builtins.hasAttr n options) config))
1616
];

0 commit comments

Comments
 (0)