Skip to content

Commit

Permalink
Add ghc 8.10.5
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Jun 8, 2021
1 parent 88b2d9f commit 7cba3df
Show file tree
Hide file tree
Showing 5 changed files with 7,927 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .buildkite/pipeline.yml
@@ -1,6 +1,6 @@
steps:
- label: 'Run tests with ghc8104'
command: "./test/tests.sh ghc8104"
- label: 'Run tests with ghc8105'
command: "./test/tests.sh ghc8105"
agents:
system: x86_64-linux

Expand All @@ -14,9 +14,9 @@ steps:
agents:
system: x86_64-linux

- label: 'Check closure size with ghc8104'
- label: 'Check closure size with ghc8105'
command:
- nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8104 -o check-closure-size.sh
- nix-build build.nix -A maintainer-scripts.check-closure-size --argstr compiler-nix-name ghc8105 -o check-closure-size.sh
- echo "+++ Closure size (MB)"
- ./check-closure-size.sh
agents:
Expand All @@ -36,5 +36,5 @@ steps:

- label: 'Make sure non store paths like can be used as src'
command:
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc884 -o check-path-support.sh
- nix-build build.nix -A maintainer-scripts.check-path-support --argstr compiler-nix-name ghc8105 -o check-path-support.sh
- ./check-path-support.sh
14 changes: 6 additions & 8 deletions ci.nix
Expand Up @@ -24,14 +24,14 @@
# Update supported-ghc-versions.md to reflect any changes made here.
{
ghc865 = false;
ghc8104 = false; # Just included because the native version is needed at eval time
ghc8105 = false; # Just included because the native version is needed at eval time
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "R2009") {
ghc865 = false;
ghc8104 = true;
ghc8105 = true;
} // nixpkgs.lib.optionalAttrs (nixpkgsName == "unstable") {
ghc865 = false;
ghc884 = false; # Native version is used to boot 9.0.1
ghc8104 = true;
ghc8105 = true;
ghc901 = true;
ghc810420210212 = false;
});
Expand All @@ -44,17 +44,15 @@
# We need to use the actual nixpkgs version we're working with here, since the values
# of 'lib.systems.examples' are not understood between all versions
let lib = nixpkgs.lib;
in lib.optionalAttrs (nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8104"])) {
in lib.optionalAttrs (nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8105"])) {
inherit (lib.systems.examples) ghcjs;
} // lib.optionalAttrs (system == "x86_64-linux" &&
nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8101" "ghc8102" "ghc8103" "ghc8104"])) {
nixpkgsName == "unstable" && (__elem compiler-nix-name ["ghc8105"])) {
# Windows cross compilation is currently broken on macOS
inherit (lib.systems.examples) mingwW64;
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && compiler-nix-name == "ghc8104") {
} // lib.optionalAttrs (system == "x86_64-linux" && nixpkgsName == "unstable" && compiler-nix-name == "ghc8105") {
# Musl cross only works on linux
# aarch64 cross only works on linux
# We also skip these for the R2003 was build of ghc8104 (we only need the
# native so ifdLevel 1 includes compiler needed in ifdLevel2 eval)
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
};
isDisabled = d: d.meta.disabled or false;
Expand Down
39 changes: 30 additions & 9 deletions overlays/bootstrap.nix
Expand Up @@ -44,7 +44,7 @@ let
latestVer = {
"8.6" = "8.6.5";
"8.8" = "8.8.4";
"8.10" = "8.10.4";
"8.10" = "8.10.5";
};
traceWarnOld = v: x: __trace
"WARNING: ${x.src-spec.version} is out of date, consider using ${latestVer.${v}}." x;
Expand Down Expand Up @@ -153,7 +153,8 @@ in {
++ from "8.10.1" ./patches/ghc/ghc-acrt-iob-func.patch

++ fromUntil "8.10.1" "8.10.3" ./patches/ghc/ghc-8.10-ubxt.patch
++ fromUntil "8.10.3" "8.11" ./patches/ghc/ghc-8.10.3-ubxt.patch
++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-ubxt.patch
++ fromUntil "8.10.5" "8.11" ./patches/ghc/ghc-8.10.5-ubxt.patch
++ final.lib.optional (versionAtLeast "8.6.4") ./patches/ghc/Cabal-3886.patch

++ fromUntil "8.10.3" "8.10.5" ./patches/ghc/ghc-8.10.3-rts-make-markLiveObject-thread-safe.patch
Expand Down Expand Up @@ -434,6 +435,26 @@ in {

ghc-patches = ghc-patches "8.10.4";
};
ghc8105 = final.callPackage ../compiler/ghc {
extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc8105; };

bootPkgs = bootPkgs // {
# Not using 8.8 due to https://gitlab.haskell.org/ghc/ghc/-/issues/18143
ghc = final.buildPackages.buildPackages.haskell-nix.compiler.ghc865;
};
inherit sphinx installDeps;

buildLlvmPackages = final.buildPackages.llvmPackages_9;
llvmPackages = final.llvmPackages_9;

src-spec = rec {
version = "8.10.5";
url = "https://downloads.haskell.org/~ghc/${version}/ghc-${version}-src.tar.xz";
sha256 = "0vq7wch0wfvy2b5dbi308lq5225vf691n95m19c9igagdvql22gi";
};

ghc-patches = ghc-patches "8.10.5";
};
ghc901 = final.callPackage ../compiler/ghc {
extra-passthru = { buildGHC = final.buildPackages.haskell-nix.compiler.ghc901; };

Expand Down Expand Up @@ -590,18 +611,18 @@ in {
cd lib
lndir ${ghcjs884}/lib ${targetPrefix}ghc-8.8.4
'' + installDeps targetPrefix);
ghc8104 = let buildGHC = final.buildPackages.haskell-nix.compiler.ghc8104;
ghc8105 = let buildGHC = final.buildPackages.haskell-nix.compiler.ghc8105;
in let ghcjs8104 = final.callPackage ../compiler/ghcjs/ghcjs.nix {
ghcjsSrcJson = ../compiler/ghcjs/ghcjs810-src.json;
ghcjsVersion = "8.10.2";
ghc = buildGHC;
ghcVersion = "8.10.4";
compiler-nix-name = "ghc8104";
}; in let targetPrefix = "js-unknown-ghcjs-"; in final.runCommand "${targetPrefix}ghc-8.10.4" {
ghcVersion = "8.10.5";
compiler-nix-name = "ghc8105";
}; in let targetPrefix = "js-unknown-ghcjs-"; in final.runCommand "${targetPrefix}ghc-8.10.5" {
nativeBuildInputs = [ final.xorg.lndir ];
passthru = {
inherit targetPrefix;
version = "8.10.4";
version = "8.10.5";
isHaskellNixCompiler = true;
enableShared = false;
inherit (ghcjs8104) configured-src bundled-ghcjs project;
Expand All @@ -620,9 +641,9 @@ in {
ln -s ${ghcjs8104}/bin/ghcjs-pkg ${targetPrefix}ghc-pkg
ln -s ${buildGHC}/bin/hsc2hs ${targetPrefix}hsc2hs
cd ..
mkdir -p lib/${targetPrefix}ghc-8.10.4
mkdir -p lib/${targetPrefix}ghc-8.10.5
cd lib
lndir ${ghcjs8104}/lib ${targetPrefix}ghc-8.10.4
lndir ${ghcjs8104}/lib ${targetPrefix}ghc-8.10.5
'' + installDeps targetPrefix);
}))));

Expand Down

0 comments on commit 7cba3df

Please sign in to comment.