From 7ad0327b599c653cd8eecdae6dcb1eb2ceccc29e Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 11 Apr 2022 01:36:54 +0200 Subject: [PATCH] release-haskell.nix: build boot ghcjs on Hydra By telling Hydra where to look explicitly, it can be instrumented to build the boot ghcjs which is only about 300MB. This saves at least some time compiling for users and will also provide some eval CI automatically. --- pkgs/top-level/release-haskell.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 4eb8d040a7da..720b4e7fc330 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -129,7 +129,18 @@ let jobs = recursiveUpdateMany [ (mapTestOn { haskellPackages = packagePlatforms pkgs.haskellPackages; - haskell.compiler = packagePlatforms pkgs.haskell.compiler; + haskell.compiler = packagePlatforms pkgs.haskell.compiler // (lib.genAttrs [ + "ghcjs" + "ghcjs810" + ] (ghcjsName: { + # We can't build ghcjs itself, since it exceeds 3GB (Hydra's output limit) due + # to the size of its bundled libs. We can however save users a bit of compile + # time by building the bootstrap ghcjs on Hydra. For this reason, we overwrite + # the ghcjs attributes in haskell.compiler with a reference to the bootstrap + # ghcjs attribute in their bootstrap package set (exposed via passthru) which + # would otherwise be ignored by Hydra. + bootGhcjs = (packagePlatforms pkgs.haskell.compiler.${ghcjsName}.passthru).bootGhcjs; + })); tests.haskell = packagePlatforms pkgs.tests.haskell;