diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 9de5636d43a3..62691f861584 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -859,6 +859,12 @@ stdenv.mkDerivation ( ghc-settings-edit "$settingsFile" \ "windres command" "${toolPath "windres" installCC}" '' + + lib.optionalString (stdenv.targetPlatform.isGhcjs && lib.versionOlder version "9.12") '' + ghc-settings-edit "$settingsFile" \ + "JavaScript CPP command" "${toolPath "cc" installCC}" + ghc-settings-edit "$settingsFile" \ + "JavaScript CPP flags" "-E -CC -Wno-unicode -nostdinc" + '' + '' # Install the bash completion file.