about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2021-12-24 21:12:56 +0100
committerRobert Hensing <robert@roberthensing.nl>2022-04-01 16:56:31 +0200
commit517cb71b026be805c41945dc86a7352b1bf8aa92 (patch)
treef99e8a75170a749ef0d3f5da033d2c0a8ee82ca0 /pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
parent76be6eaf29de81e7cdbad268e8f90106dcf021b5 (diff)
downloadnixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar.gz
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar.bz2
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar.lz
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar.xz
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.tar.zst
nixlib-517cb71b026be805c41945dc86a7352b1bf8aa92.zip
haskellPackages.inline-c-cpp: Fix tests on darwin
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
index f36c77d636a7..855afa28101d 100644
--- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
+++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix
@@ -2,6 +2,10 @@
 
 with haskellLib;
 
+let
+  inherit (pkgs.stdenv.hostPlatform) isDarwin;
+in
+
 self: super: {
 
   llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
@@ -118,4 +122,10 @@ self: super: {
   multistate = doJailbreak super.multistate;
   # https://github.com/lspitzner/butcher/issues/7
   butcher = doJailbreak super.butcher;
+
+  # We use a GHC patch to support the fix for https://github.com/fpco/inline-c/issues/127
+  # which means that the upstream cabal file isn't allowed to add the flag.
+  inline-c-cpp =
+    (if isDarwin then appendConfigureFlags ["--ghc-option=-fcompact-unwind"] else x: x)
+    super.inline-c-cpp;
 }