Skip to content

Commit

Permalink
Fix for latest GHC head where ghc-bignum has no exported-modules and …
Browse files Browse the repository at this point in the history
…renames som of the reexported ones.
  • Loading branch information
hamishmack committed Jan 5, 2025
1 parent 78f5c60 commit 22b3d02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/call-cabal-project-to-nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,13 @@ let
# FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted.
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
''}
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isWindows ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
''}
${pkgs.lib.optionalString (!pkgs.stdenv.targetPlatform.isWindows) ''
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
''}
EXPOSED_MODULES_${varname name}="$(tr '\n' ' ' <<< "$exposed_modules $reexported_modules")"
Expand Down

0 comments on commit 22b3d02

Please sign in to comment.