From 1f167aa460ef03acfe552fcad0410a512ec5fb79 Mon Sep 17 00:00:00 2001 From: Slava Gorbunov Date: Mon, 27 Oct 2025 20:40:58 +0300 Subject: [PATCH] ghc: provide JavaScript CPP command for ghcjs build --- pkgs/development/compilers/ghc/common-hadrian.nix | 6 ++++++ 1 file changed, 6 insertions(+) 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.