about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
diff options
context:
space:
mode:
authorRodney Lorrimar <dev@rodney.id.au>2023-07-06 16:08:01 +0800
committerRodney Lorrimar <dev@rodney.id.au>2023-07-06 20:18:44 +0800
commit30e99eddbeca88f171d3708780d74f2efb9ac4d7 (patch)
tree3603cdbde7c9fe68b2dcf408c5b68511c9283dac /pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
parent689ff4fd8f947974e836a08162b0c429ea420d82 (diff)
downloadnixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar.gz
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar.bz2
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar.lz
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar.xz
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.tar.zst
nixlib-30e99eddbeca88f171d3708780d74f2efb9ac4d7.zip
haskell.packages.ghc96.gi-gtk: Work around compiler issue
When building gi-gtk with ghc-9.6.1 and ghc-9.6.2 there are errors
like this:

  <no location info>: error:
  attempting to use module ‘gi-gtk-3.0.41-DcfU7A0rbDCAyPkJQEwKC:GI.Gtk.Interfaces.Buildable’ (./GI/Gtk/Interfaces/Buildable.hs) which is not loaded

The errors can be avoided by using -j1, which is unfortunate for
gi-gtk because it has 708 modules to build.

The ghc gitlab issue is: https://gitlab.haskell.org/ghc/ghc/-/issues/23392
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
index 0aa995c8506d..b876605754ff 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-9.6.x.nix
@@ -14,6 +14,9 @@ let
     else
       builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
   jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
+
+  # Workaround for a ghc-9.6 issue: https://gitlab.haskell.org/ghc/ghc/-/issues/23392
+  disableParallelBuilding = overrideCabal (drv: { enableParallelBuilding = false; });
 in
 
 self: super: {
@@ -207,7 +210,6 @@ self: super: {
     gi-glib
     gi-gmodule
     gi-gobject
-    gi-gtk
     gi-harfbuzz
     gi-pango
     gi-xlib
@@ -219,6 +221,9 @@ self: super: {
     taffybar
   ;
 
+  # Avoid triggering an issue in ghc-9.6.2
+  gi-gtk = disableParallelBuilding (__CabalEagerPkgConfigWorkaround super.gi-gtk);
+
   # Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
   gtk = doJailbreak super.gtk;