Merge pull request #9130 from obadz/haskell-fixes
Haskell: patch regex-tdfa-text to fix build (required to build Leksah) + minor fixes
This commit is contained in:
commit
dc293f6cea
@ -561,7 +561,7 @@ self: super: {
|
|||||||
duplo = dontCheck super.duplo;
|
duplo = dontCheck super.duplo;
|
||||||
|
|
||||||
# Nix-specific workaround
|
# 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
|
# https://github.com/evanrinehart/mikmod/issues/1
|
||||||
mikmod = addExtraLibrary super.mikmod pkgs.libmikmod;
|
mikmod = addExtraLibrary super.mikmod pkgs.libmikmod;
|
||||||
@ -633,7 +633,7 @@ self: super: {
|
|||||||
|
|
||||||
# wxc needs help deciding which version of GTK to use.
|
# wxc needs help deciding which version of GTK to use.
|
||||||
wxc = overrideCabal (super.wxc.override { wxGTK = pkgs.wxGTK29; }) (drv: {
|
wxc = overrideCabal (super.wxc.override { wxGTK = pkgs.wxGTK29; }) (drv: {
|
||||||
patches = [ ./wxc-no-ldconfig.patch ];
|
patches = [ ./patches/wxc-no-ldconfig.patch ];
|
||||||
doHaddock = false;
|
doHaddock = false;
|
||||||
postInstall = "cp -v dist/build/libwxc.so.${drv.version} $out/lib/libwxc.so";
|
postInstall = "cp -v dist/build/libwxc.so.${drv.version} $out/lib/libwxc.so";
|
||||||
});
|
});
|
||||||
@ -783,7 +783,7 @@ self: super: {
|
|||||||
leksah = dontCheck super.leksah;
|
leksah = dontCheck super.leksah;
|
||||||
|
|
||||||
# Patch to consider NIX_GHC just like xmonad does
|
# 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.
|
# Test suite won't compile against tasty-hunit 0.9.x.
|
||||||
zlib = dontCheck super.zlib;
|
zlib = dontCheck super.zlib;
|
||||||
|
@ -205,7 +205,7 @@ self: super: {
|
|||||||
tasty-rerun = dontHaddock (appendConfigureFlag super.tasty-rerun "--ghc-option=-XFlexibleContexts");
|
tasty-rerun = dontHaddock (appendConfigureFlag super.tasty-rerun "--ghc-option=-XFlexibleContexts");
|
||||||
|
|
||||||
# http://hub.darcs.net/ivanm/graphviz/issue/5
|
# 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.
|
# Broken with GHC 7.10.x.
|
||||||
aeson_0_7_0_6 = markBroken super.aeson_0_7_0_6;
|
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;
|
seqid-streams_0_1_0 = markBroken super.seqid-streams_0_1_0;
|
||||||
vector_0_10_9_3 = markBroken super.vector_0_10_9_3;
|
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
|
# https://github.com/HugoDaniel/RFC3339/issues/14
|
||||||
timerep = dontCheck super.timerep;
|
timerep = dontCheck super.timerep;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ self: super: {
|
|||||||
});
|
});
|
||||||
|
|
||||||
ghc-paths = overrideCabal super.ghc-paths (drv: {
|
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: {
|
reflex-dom = overrideCabal super.reflex-dom (drv: {
|
||||||
|
@ -3,8 +3,6 @@
|
|||||||
, overrides ? (self: super: {})
|
, overrides ? (self: super: {})
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with ./lib.nix;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
fix = f: let x = f x // { __unfix__ = f; }; in x;
|
fix = f: let x = f x // { __unfix__ = f; }; in x;
|
||||||
|
@ -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,
|
|
@ -53993,7 +53993,7 @@ self: {
|
|||||||
version = "0.1.0.9";
|
version = "0.1.0.9";
|
||||||
sha256 = "0ibrr1dxa35xx20cpp8jzgfak1rdmy344dfwq4vlq013c6w8z9mg";
|
sha256 = "0ibrr1dxa35xx20cpp8jzgfak1rdmy344dfwq4vlq013c6w8z9mg";
|
||||||
buildDepends = [ base ];
|
buildDepends = [ base ];
|
||||||
patches = [ ./ghc-paths-nix.patch ];
|
patches = [ ./patches/ghc-paths-nix.patch ];
|
||||||
description = "Knowledge of GHC's installation directories";
|
description = "Knowledge of GHC's installation directories";
|
||||||
license = stdenv.lib.licenses.bsd3;
|
license = stdenv.lib.licenses.bsd3;
|
||||||
}) {};
|
}) {};
|
||||||
|
@ -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
|
|
||||||
|
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user