Skip to content

Commit a59be5c

Browse files
authored
Add GHC 9.0.1 (#1032)
Also refactors the way tests are filtered to use `meta.disabled` where possible.
1 parent 0b53ee4 commit a59be5c

File tree

97 files changed

+12175
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+12175
-91
lines changed

build.nix

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ in rec {
2020
tests = import ./test/default.nix { inherit pkgs ifdLevel compiler-nix-name; };
2121

2222
tools = pkgs.lib.optionalAttrs (ifdLevel >= 3) (
23-
pkgs.recurseIntoAttrs {
23+
pkgs.recurseIntoAttrs ({
2424
cabal-latest = tool compiler-nix-name "cabal" "latest";
25+
} // pkgs.lib.optionalAttrs (compiler-nix-name != "ghc901") {
2526
hls-latest = tool compiler-nix-name "haskell-language-server" "latest";
2627
hlint-latest = tool compiler-nix-name "hlint" (if compiler-nix-name == "ghc865" then "3.2.7" else "latest");
27-
}
28+
})
2829
);
2930

3031
# Scripts for keeping Hackage and Stackage up to date, and CI tasks.

ci.nix

+3-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@
3030
ghc884 = true;
3131
ghc8104 = true;
3232
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
33-
ghc884 = true;
33+
ghc884 = false;
3434
ghc8104 = true;
35+
ghc901 = true;
3536
ghc810420210212 = false;
3637
});
3738
systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
@@ -58,9 +59,7 @@
5859
# native so ifdLevel 1 includes compiler needed in ifdLevel2 eval)
5960
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
6061
};
61-
isDisabled = d:
62-
let meta = d.meta or {};
63-
in meta.disabled or false;
62+
isDisabled = d: d.meta.disabled or false;
6463
in
6564
dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
6665
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};

compiler/ghc/default.nix

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ let self =
88

99
# build-tools
1010
, bootPkgs
11+
, buildPackages
1112
, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx, numactl, elfutils
1213
, autoreconfHook
1314
, bash
@@ -100,6 +101,9 @@ let
100101
CrossCompilePrefix = ${targetPrefix}
101102
'' + lib.optionalString isCrossTarget ''
102103
Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
104+
''
105+
# GHC 9.0.1 fails to compile for musl unless HADDOC_DOCS = NO
106+
+ lib.optionalString (isCrossTarget || (targetPlatform.isMusl && builtins.compareVersions ghc-version "9.0.1" >= 0)) ''
103107
HADDOCK_DOCS = NO
104108
BUILD_SPHINX_HTML = NO
105109
BUILD_SPHINX_PDF = NO
@@ -337,6 +341,11 @@ stdenv.mkDerivation (rec {
337341
inherit (ghc.meta) license platforms;
338342
};
339343

344+
# Needed for `haddock` to work on source that includes non ASCII chars
345+
LANG = "en_US.UTF-8";
346+
LC_ALL = "en_US.UTF-8";
347+
} // lib.optionalAttrs (stdenv.buildPlatform.libc == "glibc") {
348+
LOCALE_ARCHIVE = "${buildPackages.glibcLocales}/lib/locale/locale-archive";
340349
} // lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
341350
dontStrip = true;
342351
dontPatchELF = true;

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.1-x86_64-linux/ghc-pkg/dump-global

+1,485
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.1-x86_64-linux/ghc-pkg/version

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.1-x86_64-linux/ghc/info

+70
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.1-x86_64-linux/ghc/numeric-version

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)