summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-ghcjs.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2016-11-18 16:38:04 +0100
committerProfpatsch <mail@profpatsch.de>2016-11-18 16:38:04 +0100
commit06e0bac814596a57166c1e862f06f8908deeb4de (patch)
tree1e8cf94b240e41410c5ff007df3b3a099b9466df /pkgs/development/haskell-modules/configuration-ghcjs.nix
parenta7043808dd63d3cbda42a273e60bc4a5244bd32f (diff)
downloadnixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar.gz
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar.bz2
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar.lz
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar.xz
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.tar.zst
nixpkgs-06e0bac814596a57166c1e862f06f8908deeb4de.zip
haskell/ghcjs: sort ghcjs packages alphabetically
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-ghcjs.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-ghcjs.nix82
1 files changed, 47 insertions, 35 deletions
diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix
index e232152d6dd..7c8541c5b47 100644
--- a/pkgs/development/haskell-modules/configuration-ghcjs.nix
+++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix
@@ -1,3 +1,7 @@
+# GHCJS package fixes
+#
+# Please insert new packages *alphabetically*
+# in the OTHER PACKAGES section.
 { pkgs }:
 
 let
@@ -9,6 +13,8 @@ with import ./lib.nix { inherit pkgs; };
 
 self: super:
 
+## GENERAL SETUP BASE PACKAGES
+
   let # The stage 1 packages
       stage1 = pkgs.lib.genAttrs super.ghc.stage1Packages (pkg: null);
       # The stage 2 packages. Regenerate with ../compilers/ghcjs/gen-stage2.rb
@@ -47,24 +53,26 @@ self: super:
   terminfo = self.terminfo_0_4_0_1;
   xhtml = self.xhtml_3000_2_1;
 
-  pqueue = overrideCabal super.pqueue (drv: {
-    postPatch = ''
-      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
-    '';
-  });
 
-  transformers-compat = overrideCabal super.transformers-compat (drv: {
-    configureFlags = [];
+## OTHER PACKAGES
+
+  cereal = addBuildDepend super.cereal [ self.fail ];
+
+  entropy = overrideCabal super.entropy (old: {
+    postPatch = old.postPatch or "" + ''
+      # cabal doesn’t find ghc in this script, since it’s in the bootPkgs
+      sed -e '/Simple.Program/a import Distribution.Simple.Program.Types' \
+          -e 's|mConf.*=.*$|mConf = Just $ simpleConfiguredProgram "ghc" (FoundOnSystem "${self.ghc.bootPkgs.ghc}/bin/ghc")|g' -i Setup.hs
+    '';
   });
 
-  profunctors = overrideCabal super.profunctors (drv: {
-    preConfigure = ''
-      sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
+  # https://github.com/kazu-yamamoto/logger/issues/97
+  fast-logger = overrideCabal super.fast-logger (old: {
+    postPatch = old.postPatch or "" + ''
+      # remove the Safe extensions, since ghcjs-boot directory
+      # doesn’t provide Trustworthy
+      sed -ie '/LANGUAGE Safe/d' System/Log/FastLogger/*.hs
+      cat System/Log/FastLogger/Date.hs
     '';
   });
 
@@ -98,6 +106,28 @@ self: super:
     patches = [ ./patches/ghc-paths-nix-ghcjs.patch ];
   });
 
+  http2 = addBuildDepends super.http2 [ self.aeson self.aeson-pretty self.hex self.unordered-containers self.vector self.word8 ];
+  # ghcjsBoot uses async 2.0.1.6, protolude wants 2.1.*
+
+  pqueue = overrideCabal super.pqueue (drv: {
+    postPatch = ''
+      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
+    '';
+  });
+
+  profunctors = overrideCabal super.profunctors (drv: {
+    preConfigure = ''
+      sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
+    '';
+  });
+
+  protolude = doJailbreak super.protolude;
+
   # reflex 0.3, made compatible with the newest GHCJS.
   reflex = overrideCabal super.reflex (drv: {
     src = pkgs.fetchFromGitHub {
@@ -122,32 +152,14 @@ self: super:
       ] drv.libraryHaskellDepends;
   });
 
-  http2 = addBuildDepends super.http2 [ self.aeson self.aeson-pretty self.hex self.unordered-containers self.vector self.word8 ];
-  # ghcjsBoot uses async 2.0.1.6, protolude wants 2.1.*
-  protolude = doJailbreak super.protolude;
   semigroups = addBuildDepends super.semigroups [ self.hashable self.unordered-containers self.text self.tagged ];
   # triggers an internal pattern match failure in haddock
   # https://github.com/haskell/haddock/issues/553
   wai = dontHaddock super.wai;
-  cereal = addBuildDepend super.cereal [ self.fail ];
 
-  entropy = overrideCabal super.entropy (old: {
-    postPatch = old.postPatch or "" + ''
-      # cabal doesn’t find ghc in this script, since it’s in the bootPkgs
-      sed -e '/Simple.Program/a import Distribution.Simple.Program.Types' \
-          -e 's|mConf.*=.*$|mConf = Just $ simpleConfiguredProgram "ghc" (FoundOnSystem "${self.ghc.bootPkgs.ghc}/bin/ghc")|g' -i Setup.hs
-    '';
+  transformers-compat = overrideCabal super.transformers-compat (drv: {
+    configureFlags = [];
   });
 
 
-  # https://github.com/kazu-yamamoto/logger/issues/97
-  fast-logger = overrideCabal super.fast-logger (old: {
-    postPatch = old.postPatch or "" + ''
-      # remove the Safe extensions, since ghcjs-boot directory
-      # doesn’t provide Trustworthy
-      sed -ie '/LANGUAGE Safe/d' System/Log/FastLogger/*.hs
-      cat System/Log/FastLogger/Date.hs
-    '';
-  });
-
 }