about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-darwin.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-darwin.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-darwin.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix
index 701c86200bd51..79317c9da55f2 100644
--- a/pkgs/development/haskell-modules/configuration-darwin.nix
+++ b/pkgs/development/haskell-modules/configuration-darwin.nix
@@ -110,6 +110,12 @@ self: super: ({
         substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
       '' + (drv.postPatch or "");
     }) super.x509-system;
+  crypton-x509-system = overrideCabal (drv:
+    lib.optionalAttrs (!pkgs.stdenv.cc.nativeLibc) {
+      postPatch = ''
+        substituteInPlace System/X509/MacOS.hs --replace security /usr/bin/security
+      '' + (drv.postPatch or "");
+    }) super.crypton-x509-system;
 
   # https://github.com/haskell-foundation/foundation/pull/412
   foundation = dontCheck super.foundation;
@@ -335,6 +341,15 @@ self: super: ({
 
 } // lib.optionalAttrs pkgs.stdenv.isAarch64 {  # aarch64-darwin
 
+  cabal2nix = overrideCabal (old: {
+    postInstall = ''
+      ${old.postInstall or ""}
+      remove-references-to -t ${self.hpack} "$out/bin/cabal2nix"
+      # Note: The `data` output is needed at runtime.
+      remove-references-to -t ${self.distribution-nixpkgs.out} "$out/bin/hackage2nix"
+    '';
+  }) super.cabal2nix;
+
   # https://github.com/fpco/unliftio/issues/87
   unliftio = dontCheck super.unliftio;
   # This is the same issue as above; the rio tests call functions in unliftio
@@ -371,4 +386,12 @@ self: super: ({
   # same
   # https://hydra.nixos.org/build/174540882/nixlog/9
   jacinda = dontCheck super.jacinda;
+
+  # Greater floating point error on x86_64-darwin (!) for some reason
+  # https://github.com/ekmett/ad/issues/113
+  ad = overrideCabal (drv: {
+    testFlags = drv.testFlags or [ ] ++ [
+      "-p" "!/issue-108/"
+    ];
+  }) super.ad;
 })