diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 9de5636d43a3..1097692029db 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 '' + ghc-settings-edit "$settingsFile" \ + "JavaScript CPP command" "${toolPath "cc" installCC}" + ghc-settings-edit "$settingsFile" \ + "JavaScript CPP flags" "-E" + '' + '' # Install the bash completion file.