Skip to content

Commit 22b3d02

Browse files
committed
Fix for latest GHC head where ghc-bignum has no exported-modules and renames som of the reexported ones.
1 parent 78f5c60 commit 22b3d02

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/call-cabal-project-to-nix.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,13 +516,13 @@ let
516516
517517
# FIXME This is a bandaid. Rather than doing this, conditionals should be interpreted.
518518
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isGhcjs ''
519-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
519+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.arch == "javascript")|.then[]' $json_cabal_file)"
520520
''}
521521
${pkgs.lib.optionalString pkgs.stdenv.targetPlatform.isWindows ''
522-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
522+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.os == "windows")|.then[]' $json_cabal_file)"
523523
''}
524524
${pkgs.lib.optionalString (!pkgs.stdenv.targetPlatform.isWindows) ''
525-
exposed_modules+=" $(jq -r '.library."exposed-modules"[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
525+
exposed_modules+=" $(jq -r '.library."exposed-modules"//[]|.[]|select(type=="object" and .if.not.os == "windows")|.then[]' $json_cabal_file)"
526526
''}
527527
528528
EXPOSED_MODULES_${varname name}="$(tr '\n' ' ' <<< "$exposed_modules $reexported_modules")"

0 commit comments

Comments
 (0)