about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/default.nix
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-01-13 22:15:29 +0100
committerPeter Simons <simons@cryp.to>2015-01-13 22:33:17 +0100
commit007628fd49bf005c90a721f70276db70fc207637 (patch)
tree2d97d2e9893359fefa6ecb94fe12f8cf43609024 /pkgs/development/haskell-modules/default.nix
parent67312f83ad8171579e25772e577c81b3fb8abdb9 (diff)
downloadnixlib-007628fd49bf005c90a721f70276db70fc207637.tar
nixlib-007628fd49bf005c90a721f70276db70fc207637.tar.gz
nixlib-007628fd49bf005c90a721f70276db70fc207637.tar.bz2
nixlib-007628fd49bf005c90a721f70276db70fc207637.tar.lz
nixlib-007628fd49bf005c90a721f70276db70fc207637.tar.xz
nixlib-007628fd49bf005c90a721f70276db70fc207637.tar.zst
nixlib-007628fd49bf005c90a721f70276db70fc207637.zip
haskell-generic-builder: use cpphs pre-processor by default on Darwin
Allegedly, the cpp implementation of Clang is weird and causes errors.
Diffstat (limited to 'pkgs/development/haskell-modules/default.nix')
-rw-r--r--pkgs/development/haskell-modules/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix
index ecfb5cf5c4e4..8978486e9308 100644
--- a/pkgs/development/haskell-modules/default.nix
+++ b/pkgs/development/haskell-modules/default.nix
@@ -25,6 +25,17 @@ let
           hyperlinkSource = false;      # Avoid depending on hscolour for this build.
           postFixup = "rm -rf $out/lib $out/share $out/nix-support";
         });
+        cpphs = overrideCabal (self.cpphs.overrideScope (self: super: {
+          mkDerivation = drv: super.mkDerivation (drv // {
+            enableSharedExecutables = false;
+            enableSharedLibraries = false;
+            noHaddock = true;
+            useCpphs = false;
+          });
+        })) (drv: {
+            isLibrary = false;
+            postFixup = "rm -rf $out/lib $out/share $out/nix-support";
+        });
       };
 
       overrideCabal = drv: f: drv.override (args: args // {