From 59ad2995cc52f963be8aeb4a7a10124669aa9bdb Mon Sep 17 00:00:00 2001 From: Moritz Angermann Date: Tue, 16 Nov 2021 21:17:02 +0800 Subject: [PATCH] Update ghcjs810-src.json (#1291) * Update ghcjs810-src.json * Update ghcjs-project.nix * Update ghcjs.nix Use nodejs-12_x, to allow larger strings to be loaded. See https://github.com/nodejs/node/issues/33960 * Update comp-builder.nix Allow large strings, see https://github.com/nodejs/node/issues/33960 * Update cabal-os-arch-comp.nix * Update ghcjs-src * Update ghcjs ref Co-authored-by: Hamish Mackenzie --- builder/comp-builder.nix | 2 +- compiler/ghcjs/ghcjs810-src.json | 6 +++--- lib/cabal-os-arch-comp.nix | 2 +- lib/ghcjs-project.nix | 4 +++- overlays/ghcjs.nix | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index 865ecf44dc..bc4b05082a 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -457,7 +457,7 @@ let if [ -f ${testExecutable} ]; then mkdir -p $(dirname $out/bin/${exeName}) ${if stdenv.hostPlatform.isGhcjs then '' - cat <(echo \#!${lib.getBin buildPackages.nodejs}/bin/node) ${testExecutable} >| $out/bin/${exeName} + cat <(echo \#!${lib.getBin buildPackages.nodejs-12_x}/bin/node) ${testExecutable} >| $out/bin/${exeName} chmod +x $out/bin/${exeName} '' else '' cp -r ${testExecutable} $(dirname $out/bin/${exeName}) diff --git a/compiler/ghcjs/ghcjs810-src.json b/compiler/ghcjs/ghcjs810-src.json index af67a54b7c..1a90d6d234 100644 --- a/compiler/ghcjs/ghcjs810-src.json +++ b/compiler/ghcjs/ghcjs810-src.json @@ -1,6 +1,6 @@ { - "url": "https://github.com/ghcjs/ghcjs", - "rev": "8802b310c89eda51f0b1ac0cded74a756642a615", - "sha256": "1ar2fzl86rik1nh06158gaa8prqbfhllh03xygsqgmj92r263ga1", + "url": "https://github.com/angerman/ghcjs", + "rev": "35afeaacd1184e7be3bb10692c242c5649ac9d89", + "sha256": "sha256-txc2mGB0hCmaXB0sC3quDKP9CCr+HQh8aLSkNozDtVY=", "fetchSubmodules": true } diff --git a/lib/cabal-os-arch-comp.nix b/lib/cabal-os-arch-comp.nix index 84c23e67f0..62126a6705 100644 --- a/lib/cabal-os-arch-comp.nix +++ b/lib/cabal-os-arch-comp.nix @@ -43,7 +43,7 @@ isPPC64 = false; isSparc = false; isArm = false; - isAArch64= false; + isAarch64= false; isMips = false; isSH = false; isIA64 = false; diff --git a/lib/ghcjs-project.nix b/lib/ghcjs-project.nix index 9491ed0c59..c1955acfee 100644 --- a/lib/ghcjs-project.nix +++ b/lib/ghcjs-project.nix @@ -75,7 +75,9 @@ let # Inputs needed to boot the GHCJS compiler bootInputs = with pkgs.buildPackages; [ - nodejs + # pin nodejs to the 12 series for now, as strings can only be half the length in node 14+ + # see https://github.com/nodejs/node/issues/33960, this can break large TH splices for now. + nodejs-12_x makeWrapper xorg.lndir gmp diff --git a/overlays/ghcjs.nix b/overlays/ghcjs.nix index 77e7a4c102..253b161c01 100644 --- a/overlays/ghcjs.nix +++ b/overlays/ghcjs.nix @@ -22,7 +22,7 @@ final: prev: set -euo pipefail exe=$1 shift - ${final.buildPackages.nodejs}/bin/node $exe $@ + ${final.buildPackages.nodejs-12_x}/bin/node $exe $@ '') + "/bin/node-wrapper")]; }) );