diff options
author | Peter Simons <simons@cryp.to> | 2015-08-06 13:56:09 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-08-06 13:56:09 +0200 |
commit | dc293f6cea9a54cc8db4dc91e43463098b29e326 (patch) | |
tree | 655490a841734deb4154d6071ea68d103911955b | |
parent | 4d22b539b81b0fac713e8d211f09fc5b2a792532 (diff) | |
parent | 64befd0cb3290310c1ea2659d9c7af59454f9987 (diff) |
Merge pull request #9130 from obadz/haskell-fixes
Haskell: patch regex-tdfa-text to fix build (required to build Leksah) + minor fixes
14 files changed, 30 insertions, 93 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 9f0b5d4599a08..5e412dab8d467 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -561,7 +561,7 @@ self: super: { duplo = dontCheck super.duplo; # Nix-specific workaround - xmonad = appendPatch super.xmonad ./xmonad-nix.patch; + xmonad = appendPatch super.xmonad ./patches/xmonad-nix.patch; # https://github.com/evanrinehart/mikmod/issues/1 mikmod = addExtraLibrary super.mikmod pkgs.libmikmod; @@ -633,7 +633,7 @@ self: super: { # wxc needs help deciding which version of GTK to use. wxc = overrideCabal (super.wxc.override { wxGTK = pkgs.wxGTK29; }) (drv: { - patches = [ ./wxc-no-ldconfig.patch ]; + patches = [ ./patches/wxc-no-ldconfig.patch ]; doHaddock = false; postInstall = "cp -v dist/build/libwxc.so.${drv.version} $out/lib/libwxc.so"; }); @@ -783,7 +783,7 @@ self: super: { leksah = dontCheck super.leksah; # Patch to consider NIX_GHC just like xmonad does - dyre = appendPatch super.dyre ./dyre-nix.patch; + dyre = appendPatch super.dyre ./patches/dyre-nix.patch; # Test suite won't compile against tasty-hunit 0.9.x. zlib = dontCheck super.zlib; diff --git a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix index e9f2219f07e4e..5ae71325a9f4b 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -205,7 +205,7 @@ self: super: { tasty-rerun = dontHaddock (appendConfigureFlag super.tasty-rerun "--ghc-option=-XFlexibleContexts"); # http://hub.darcs.net/ivanm/graphviz/issue/5 - graphviz = dontCheck (dontJailbreak (appendPatch super.graphviz ./graphviz-fix-ghc710.patch)); + graphviz = dontCheck (dontJailbreak (appendPatch super.graphviz ./patches/graphviz-fix-ghc710.patch)); # Broken with GHC 7.10.x. aeson_0_7_0_6 = markBroken super.aeson_0_7_0_6; @@ -219,6 +219,9 @@ self: super: { seqid-streams_0_1_0 = markBroken super.seqid-streams_0_1_0; vector_0_10_9_3 = markBroken super.vector_0_10_9_3; + # http://hub.darcs.net/shelarcy/regex-tdfa-text/issue/1 -- upstream seems to be asleep + regex-tdfa-text = appendPatch super.regex-tdfa-text ./patches/regex-tdfa-text.patch; + # https://github.com/HugoDaniel/RFC3339/issues/14 timerep = dontCheck super.timerep; diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix index 6fbb28d026eec..1e56981fe8f32 100644 --- a/pkgs/development/haskell-modules/configuration-ghcjs.nix +++ b/pkgs/development/haskell-modules/configuration-ghcjs.nix @@ -87,7 +87,7 @@ self: super: { }); ghc-paths = overrideCabal super.ghc-paths (drv: { - patches = [ ./ghc-paths-nix-ghcjs.patch ]; + patches = [ ./patches/ghc-paths-nix-ghcjs.patch ]; }); reflex-dom = overrideCabal super.reflex-dom (drv: { diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index 04158ae8e9b58..ab3ac6930b90b 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -3,8 +3,6 @@ , overrides ? (self: super: {}) }: -with ./lib.nix; - let fix = f: let x = f x // { __unfix__ = f; }; in x; diff --git a/pkgs/development/haskell-modules/edit-distance-fix-boundaries.patch b/pkgs/development/haskell-modules/edit-distance-fix-boundaries.patch deleted file mode 100644 index ec88c65f8bc01..0000000000000 --- a/pkgs/development/haskell-modules/edit-distance-fix-boundaries.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ru3 edit-distance-0.2.1.2-old/edit-distance.cabal edit-distance-0.2.1.2/edit-distance.cabal ---- edit-distance-0.2.1.2-old/edit-distance.cabal 2015-04-17 22:46:50.964116064 +0300 -+++ edit-distance-0.2.1.2/edit-distance.cabal 2015-04-17 22:41:31.216027373 +0300 -@@ -36,7 +36,7 @@ - Text.EditDistance.ArrayUtilities - - if flag(splitBase) -- Build-Depends: base >= 3 && < 4.8, array >= 0.1, random >= 1.0, containers >= 0.1.0.1 -+ Build-Depends: base >= 3 && < 5, array >= 0.1, random >= 1.0, containers >= 0.1.0.1 - else - Build-Depends: base < 3 - -@@ -54,7 +54,7 @@ - else - Build-Depends: test-framework >= 0.1.1, QuickCheck >= 1.1 && < 2.0, test-framework-quickcheck - if flag(splitBase) -- Build-Depends: base >= 3 && < 4.8, array >= 0.1, random >= 1.0 -+ Build-Depends: base >= 3 && < 5, array >= 0.1, random >= 1.0 - else - Build-Depends: base < 3 - -@@ -65,7 +65,7 @@ - Buildable: False - else - if flag(splitBase) -- Build-Depends: base >= 3 && < 4.8, array >= 0.1, random >= 1.0, time >= 1.0, process >= 1.0, -+ Build-Depends: base >= 3 && < 5, array >= 0.1, random >= 1.0, time >= 1.0, process >= 1.0, - deepseq >= 1.2, unix >= 2.3, criterion >= 0.6 - else - Build-Depends: base < 3, diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index b6a18d7653c23..0c02cdec9b0ae 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -53993,7 +53993,7 @@ self: { version = "0.1.0.9"; sha256 = "0ibrr1dxa35xx20cpp8jzgfak1rdmy344dfwq4vlq013c6w8z9mg"; buildDepends = [ base ]; - patches = [ ./ghc-paths-nix.patch ]; + patches = [ ./patches/ghc-paths-nix.patch ]; description = "Knowledge of GHC's installation directories"; license = stdenv.lib.licenses.bsd3; }) {}; diff --git a/pkgs/development/haskell-modules/haskell-src-meta-ghc710.patch b/pkgs/development/haskell-modules/haskell-src-meta-ghc710.patch deleted file mode 100644 index c3df98043b3bb..0000000000000 --- a/pkgs/development/haskell-modules/haskell-src-meta-ghc710.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 24e6f45408083745080ff2f3710f58209041113c Mon Sep 17 00:00:00 2001 -From: Luite Stegeman <stegeman@gmail.com> -Date: Sun, 28 Dec 2014 21:33:22 +0100 -Subject: [PATCH] updates for GHC 7.10 and Template Haskell 2.10 - ---- - haskell-src-meta.cabal | 4 ++-- - src/Language/Haskell/Meta/Syntax/Translate.hs | 6 ++++++ - src/Language/Haskell/Meta/Utils.hs | 5 ++++- - 3 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/src/Language/Haskell/Meta/Syntax/Translate.hs b/src/Language/Haskell/Meta/Syntax/Translate.hs -index 189d32e..36a08f1 100644 ---- a/src/Language/Haskell/Meta/Syntax/Translate.hs -+++ b/src/Language/Haskell/Meta/Syntax/Translate.hs -@@ -384,9 +384,15 @@ a .->. b = AppT (AppT ArrowT a) b - toCxt :: Hs.Context -> Cxt - toCxt = fmap toPred - where -+#if MIN_VERSION_template_haskell(2,10,0) -+ toPred (Hs.ClassA n ts) = foldl' AppT (ConT (toName n)) (fmap toType ts) -+ toPred (Hs.InfixA t1 n t2) = foldl' AppT (ConT (toName n)) (fmap toType [t1,t2]) -+ toPred (Hs.EqualP t1 t2) = foldl' AppT EqualityT (fmap toType [t1,t2]) -+#else - toPred (Hs.ClassA n ts) = ClassP (toName n) (fmap toType ts) - toPred (Hs.InfixA t1 n t2) = ClassP (toName n) (fmap toType [t1, t2]) - toPred (Hs.EqualP t1 t2) = EqualP (toType t1) (toType t2) -+#endif - toPred a@Hs.IParam{} = noTH "toCxt" a - - foldAppT :: Type -> [Type] -> Type -diff --git a/src/Language/Haskell/Meta/Utils.hs b/src/Language/Haskell/Meta/Utils.hs -index 36f7e96..d194f3e 100644 ---- a/src/Language/Haskell/Meta/Utils.hs -+++ b/src/Language/Haskell/Meta/Utils.hs -@@ -166,6 +166,9 @@ renameT env new (ForallT ns cxt t) = - unVarT (VarT n) = PlainTV n - renamePreds = renameThings renamePred - -+#if MIN_VERSION_template_haskell(2,10,0) -+ renamePred = renameT -+#else - renamePred env new (ClassP n ts) = let - (ts', env', new') = renameTs env new [] ts - in (ClassP (normaliseName n) ts', env', new') -@@ -174,7 +177,7 @@ renameT env new (ForallT ns cxt t) = - (t1', env1, new1) = renameT env new t1 - (t2', env2, new2) = renameT env1 new1 t2 - in (EqualP t1' t2', env2, new2) -- -+#endif - - -- | Remove qualification, etc. - normaliseName :: Name -> Name - diff --git a/pkgs/development/haskell-modules/dyre-nix.patch b/pkgs/development/haskell-modules/patches/dyre-nix.patch index 458e540e0c4ad..458e540e0c4ad 100644 --- a/pkgs/development/haskell-modules/dyre-nix.patch +++ b/pkgs/development/haskell-modules/patches/dyre-nix.patch diff --git a/pkgs/development/haskell-modules/ghc-paths-nix-ghcjs.patch b/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch index 26ea0eaa5a8ba..26ea0eaa5a8ba 100644 --- a/pkgs/development/haskell-modules/ghc-paths-nix-ghcjs.patch +++ b/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch diff --git a/pkgs/development/haskell-modules/ghc-paths-nix.patch b/pkgs/development/haskell-modules/patches/ghc-paths-nix.patch index b3c75a26a035e..b3c75a26a035e 100644 --- a/pkgs/development/haskell-modules/ghc-paths-nix.patch +++ b/pkgs/development/haskell-modules/patches/ghc-paths-nix.patch diff --git a/pkgs/development/haskell-modules/graphviz-fix-ghc710.patch b/pkgs/development/haskell-modules/patches/graphviz-fix-ghc710.patch index e72bb793da735..e72bb793da735 100644 --- a/pkgs/development/haskell-modules/graphviz-fix-ghc710.patch +++ b/pkgs/development/haskell-modules/patches/graphviz-fix-ghc710.patch diff --git a/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch b/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch new file mode 100644 index 0000000000000..ef349b1cb6418 --- /dev/null +++ b/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch @@ -0,0 +1,21 @@ +--- regex-tdfa-text-1.0.0.2/Text/Regex/TDFA/Text/Lazy.orig.hs 2015-08-05 20:30:01.228983428 +0100 ++++ regex-tdfa-text-1.0.0.2/Text/Regex/TDFA/Text/Lazy.hs 2015-08-05 20:39:25.682563005 +0100 +@@ -26,7 +26,7 @@ + import Data.Array.IArray((!),elems,amap) + import qualified Data.Text.Lazy as L(Text,empty,take,drop,uncons,unpack) + +-import Text.Regex.Base(MatchArray,RegexContext(..),Extract(..),RegexMaker(..),RegexLike(..)) ++import Text.Regex.Base(MatchText,MatchArray,RegexContext(..),Extract(..),RegexMaker(..),RegexLike(..)) + import Text.Regex.Base.Impl(polymatch,polymatchM) + import Text.Regex.TDFA.ReadRegex(parseRegex) + import Text.Regex.TDFA.String() -- piggyback on RegexMaker for String +@@ -74,7 +74,8 @@ + ,after (o+l) source)) + (matchOnce regex source) + matchAllText regex source = +- let go i _ _ | i `seq` False = undefined ++ let go :: Int -> L.Text -> [MatchArray] -> [MatchText L.Text] ++ go i _ _ | i `seq` False = undefined + go _i _t [] = [] + go i t (x:xs) = + let (off0,len0) = x!0 diff --git a/pkgs/development/haskell-modules/wxc-no-ldconfig.patch b/pkgs/development/haskell-modules/patches/wxc-no-ldconfig.patch index 72a8648cab678..72a8648cab678 100644 --- a/pkgs/development/haskell-modules/wxc-no-ldconfig.patch +++ b/pkgs/development/haskell-modules/patches/wxc-no-ldconfig.patch diff --git a/pkgs/development/haskell-modules/xmonad-nix.patch b/pkgs/development/haskell-modules/patches/xmonad-nix.patch index 810d8435a3438..810d8435a3438 100644 --- a/pkgs/development/haskell-modules/xmonad-nix.patch +++ b/pkgs/development/haskell-modules/patches/xmonad-nix.patch |