From 23f5a23ec7251a54918d00aa996bfffcb6b72d3b Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 5 Aug 2015 20:42:33 +0100 Subject: [PATCH 1/4] haskell-modules/default.nix: this line of code is invalid but wasn't causing harm thanks to non-strictness --- pkgs/development/haskell-modules/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index 04158ae8e9b5..ab3ac6930b90 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; From 3801ef59127330d30f98ff3af3e04e7ac790722e Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 5 Aug 2015 20:48:18 +0100 Subject: [PATCH 2/4] haskell: move patches to patches directory --- pkgs/development/haskell-modules/configuration-common.nix | 6 +++--- .../haskell-modules/configuration-ghc-7.10.x.nix | 2 +- pkgs/development/haskell-modules/configuration-ghcjs.nix | 2 +- pkgs/development/haskell-modules/hackage-packages.nix | 2 +- .../haskell-modules/{ => patches}/dyre-nix.patch | 0 .../{ => patches}/edit-distance-fix-boundaries.patch | 0 .../haskell-modules/{ => patches}/ghc-paths-nix-ghcjs.patch | 0 .../haskell-modules/{ => patches}/ghc-paths-nix.patch | 0 .../haskell-modules/{ => patches}/graphviz-fix-ghc710.patch | 0 .../{ => patches}/haskell-src-meta-ghc710.patch | 0 .../haskell-modules/{ => patches}/wxc-no-ldconfig.patch | 0 .../haskell-modules/{ => patches}/xmonad-nix.patch | 0 12 files changed, 6 insertions(+), 6 deletions(-) rename pkgs/development/haskell-modules/{ => patches}/dyre-nix.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/edit-distance-fix-boundaries.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/ghc-paths-nix-ghcjs.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/ghc-paths-nix.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/graphviz-fix-ghc710.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/haskell-src-meta-ghc710.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/wxc-no-ldconfig.patch (100%) rename pkgs/development/haskell-modules/{ => patches}/xmonad-nix.patch (100%) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 9f0b5d4599a0..5e412dab8d46 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 e9f2219f07e4..cd06bf0f2645 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; diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs.nix index 6fbb28d026ee..1e56981fe8f3 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/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index b6a18d7653c2..0c02cdec9b0a 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/dyre-nix.patch b/pkgs/development/haskell-modules/patches/dyre-nix.patch similarity index 100% rename from pkgs/development/haskell-modules/dyre-nix.patch rename to pkgs/development/haskell-modules/patches/dyre-nix.patch diff --git a/pkgs/development/haskell-modules/edit-distance-fix-boundaries.patch b/pkgs/development/haskell-modules/patches/edit-distance-fix-boundaries.patch similarity index 100% rename from pkgs/development/haskell-modules/edit-distance-fix-boundaries.patch rename to pkgs/development/haskell-modules/patches/edit-distance-fix-boundaries.patch diff --git a/pkgs/development/haskell-modules/ghc-paths-nix-ghcjs.patch b/pkgs/development/haskell-modules/patches/ghc-paths-nix-ghcjs.patch similarity index 100% rename from pkgs/development/haskell-modules/ghc-paths-nix-ghcjs.patch rename to 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 similarity index 100% rename from pkgs/development/haskell-modules/ghc-paths-nix.patch rename to 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 similarity index 100% rename from pkgs/development/haskell-modules/graphviz-fix-ghc710.patch rename to pkgs/development/haskell-modules/patches/graphviz-fix-ghc710.patch diff --git a/pkgs/development/haskell-modules/haskell-src-meta-ghc710.patch b/pkgs/development/haskell-modules/patches/haskell-src-meta-ghc710.patch similarity index 100% rename from pkgs/development/haskell-modules/haskell-src-meta-ghc710.patch rename to pkgs/development/haskell-modules/patches/haskell-src-meta-ghc710.patch diff --git a/pkgs/development/haskell-modules/wxc-no-ldconfig.patch b/pkgs/development/haskell-modules/patches/wxc-no-ldconfig.patch similarity index 100% rename from pkgs/development/haskell-modules/wxc-no-ldconfig.patch rename to 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 similarity index 100% rename from pkgs/development/haskell-modules/xmonad-nix.patch rename to pkgs/development/haskell-modules/patches/xmonad-nix.patch From 5632ab7b24af33e081e77191b108796e0a80b781 Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 5 Aug 2015 20:49:23 +0100 Subject: [PATCH 3/4] haskell: delete unused patches --- .../edit-distance-fix-boundaries.patch | 30 ---------- .../patches/haskell-src-meta-ghc710.patch | 55 ------------------- 2 files changed, 85 deletions(-) delete mode 100644 pkgs/development/haskell-modules/patches/edit-distance-fix-boundaries.patch delete mode 100644 pkgs/development/haskell-modules/patches/haskell-src-meta-ghc710.patch diff --git a/pkgs/development/haskell-modules/patches/edit-distance-fix-boundaries.patch b/pkgs/development/haskell-modules/patches/edit-distance-fix-boundaries.patch deleted file mode 100644 index ec88c65f8bc0..000000000000 --- a/pkgs/development/haskell-modules/patches/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/patches/haskell-src-meta-ghc710.patch b/pkgs/development/haskell-modules/patches/haskell-src-meta-ghc710.patch deleted file mode 100644 index c3df98043b3b..000000000000 --- a/pkgs/development/haskell-modules/patches/haskell-src-meta-ghc710.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 24e6f45408083745080ff2f3710f58209041113c Mon Sep 17 00:00:00 2001 -From: Luite Stegeman -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 - From 64befd0cb3290310c1ea2659d9c7af59454f9987 Mon Sep 17 00:00:00 2001 From: obadz Date: Wed, 5 Aug 2015 20:54:43 +0100 Subject: [PATCH 4/4] haskell/regex-tdfa-text: add patch to fix build http://hub.darcs.net/shelarcy/regex-tdfa-text/issue/1 --- .../configuration-ghc-7.10.x.nix | 3 +++ .../patches/regex-tdfa-text.patch | 21 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/haskell-modules/patches/regex-tdfa-text.patch 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 cd06bf0f2645..5ae71325a9f4 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix @@ -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/patches/regex-tdfa-text.patch b/pkgs/development/haskell-modules/patches/regex-tdfa-text.patch new file mode 100644 index 000000000000..ef349b1cb641 --- /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