summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghcjs.nix
diff options
context:
space:
mode:
authorCharles Strahan <charles.c.strahan@gmail.com>2015-03-12 23:20:56 -0400
committerPeter Simons <simons@cryp.to>2015-03-29 03:34:04 +0200
commitd590a0f4b63901766b94ef8691baa389db56d074 (patch)
tree7bf5ab1aa0c0159aeff3ceca338117cc5f6ef5e1 /pkgs/development/haskell-modules/configuration-ghcjs.nix
parent1901f3fe77d24c0eef00f73f73c176fae3bcb44e (diff)
downloadnixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar.gz
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar.bz2
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar.lz
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar.xz
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.tar.zst
nixpkgs-d590a0f4b63901766b94ef8691baa389db56d074.zip
ghcjs: support for Haskell-NG
closes #5828
closes #6786
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghcjs.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghcjs.nix78
1 files changed, 68 insertions, 10 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix
index 9ae45e9425b..aad0da0604e 100644
--- a/pkgs/development/haskell-modules/configuration-ghcjs.nix
+++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix
@@ -7,6 +7,12 @@ self: super: {
   # LLVM is not supported on this GHC; use the latest one.
   inherit (pkgs) llvmPackages;
 
+  jailbreak-cabal = pkgs.haskell-ng.packages.ghc7101.jailbreak-cabal;
+
+  # Many packages fail with:
+  #   haddock: internal error: expectJust getPackageDetails
+  mkDerivation = drv: super.mkDerivation (drv // { doHaddock = false; });
+
   # This is the list of packages that are built into a booted ghcjs installation
   # It can be generated with the command:
   # nix-shell '<nixpkgs>' -A pkgs.haskellPackages_ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^    \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'"
@@ -19,21 +25,21 @@ self: super: {
   binary = null;
   rts = null;
   bytestring = null;
-  caseInsensitive = null;
+  case-insensitive = null;
   containers = null;
   deepseq = null;
   directory = null;
   dlist = null;
-  extensibleExceptions = null;
+  extensible-exceptions = null;
   filepath = null;
-  ghcPrim = null;
-  ghcjsBase = null;
-  ghcjsPrim = null;
+  ghc-prim = null;
+  ghcjs-base = null;
+  ghcjs-prim = null;
   hashable = null;
-  integerGmp = null;
+  integer-gmp = null;
   mtl = null;
-  oldLocale = null;
-  oldTime = null;
+  old-locale = null;
+  old-time = null;
   parallel = null;
   pretty = null;
   primitive = null;
@@ -41,12 +47,64 @@ self: super: {
   scientific = null;
   stm = null;
   syb = null;
-  templateHaskell = null;
+  template-haskell = null;
   text = null;
   time = null;
   transformers = null;
   unix = null;
-  unorderedContainers = null;
+  unordered-containers = null;
   vector = null;
 
+  pqueue = overrideCabal super.pqueue (drv: {
+    patchPhase = ''
+      sed -i -e '12s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
+      sed -i -e '64s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
+      sed -i -e '32s|null|Data.PQueue.Internals.null|' Data/PQueue/Min.hs
+      sed -i -e '32s|null|Data.PQueue.Max.null|' Data/PQueue/Max.hs
+      sed -i -e '42s|null|Data.PQueue.Prio.Internals.null|' Data/PQueue/Prio/Min.hs
+      sed -i -e '42s|null|Data.PQueue.Prio.Max.null|' Data/PQueue/Prio/Max.hs
+    '';
+  });
+
+  reactive-banana = overrideCabal super.reactive-banana (drv: {
+    patchPhase = ''
+      cat >> src/Reactive/Banana/Switch.hs <<EOF
+      instance Functor (AnyMoment Identity) where
+        fmap = liftM
+        
+      instance Applicative (AnyMoment Identity) where
+        pure = return
+        (<*>) = ap
+      EOF
+    '';
+  });
+
+  transformers-compat = overrideCabal super.transformers-compat (drv: {
+    configureFlags = [];
+  });
+
+  dependent-map = overrideCabal super.dependent-map (drv: {
+    preConfigure = ''
+      sed -i 's/^.*trust base.*$//' *.cabal
+    '';
+  });
+
+  profunctors = overrideCabal super.profunctors (drv: {
+    preConfigure = ''
+      sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
+    '';
+  });
+
+  "ghcjs-dom" = self.callPackage
+    ({ mkDerivation, base, mtl, text, ghcjs-base
+     }:
+     mkDerivation {
+       pname = "ghcjs-dom";
+       version = "0.1.1.3";
+       sha256 = "0pdxb2s7fflrh8sbqakv0qi13jkn3d0yc32xhg2944yfjg5fvlly";
+       buildDepends = [ base mtl text ghcjs-base ];
+       description = "DOM library that supports both GHCJS and WebKitGTK";
+       license = pkgs.stdenv.lib.licenses.mit;
+       hydraPlatforms = pkgs.stdenv.lib.platforms.none;
+     }) {};
 }