on iko/ghcjs-patch-master help sign in
Adds ghc865 logic (#167)

* Adds ghc865 logic * Move nixpkgs pin back to nixos/nixpkgs

commitf4cc5ebcc6b6827243cf8baf0e71493301d58693 authorMoritz Angermann <moritz.angermann@gmail.com> dateSat 8 Jun 2019, 15:29 (7 years ago) parent03fd50f
8 files changed+313−3
nixpkgs/github.json+3−3 patches/default.nix+1 patches/ghc865/binary-0.8.6.0.patch+20 patches/ghc865/containers-0.6.0.1.patch+117 patches/ghc865/default.nix+7 patches/ghc865/hpc-0.6.0.3.patch+18 patches/ghc865/parsec-3.1.13.0.patch+36 patches/ghc865/unix-2.7.2.2.patch+111
nixpkgs/github.json+3−3
@@ -1,7 +1,7 @@
11{
22 "url": "https://github.com/NixOS/nixpkgs",
3− "rev": "0728c3e026e3ac2542a9673d57533829e552e218",
4− "date": "2019-05-17T15:35:26+02:00",
5− "sha256": "0sp8giack8na9hdm8ivk969mpwfcavqrfy7kncx0a1hs1ykw15hy",
3+ "rev": "538639a55ce915effc543b3e9c6c901f8ea624c1",
4+ "date": "2019-06-07T01:19:18+02:00",
5+ "sha256": "1chkvpwj44xk8j7756sn1cymvzrv1nwryr8p13z1fv28lqjflz4p",
66 "fetchSubmodules": false
77}
patches/default.nix+1
@@ -7,4 +7,5 @@
77 ghc862 = import ./ghc862;
88 ghc863 = import ./ghc863;
99 ghc864 = import ./ghc864;
10+ ghc865 = import ./ghc865;
1011}
patches/ghc865/binary-0.8.6.0.patchnew file+20
@@ -0,0 +1,20 @@
1+diff --git a/binary.cabal b/binary.cabal
2+index 9b25877..1d1b9cf 100644
3+--- a/binary.cabal
4++++ b/binary.cabal
5+@@ -158,7 +158,6 @@ benchmark get
6+ Data.Binary.Class
7+ Data.Binary.FloatCast
8+ Data.Binary.Generic
9+- Data.Binary.Get
10+ Data.Binary.Get.Internal
11+ Data.Binary.Internal
12+ Data.Binary.Put
13+@@ -191,7 +190,6 @@ benchmark put
14+ Data.Binary.Get
15+ Data.Binary.Get.Internal
16+ Data.Binary.Internal
17+- Data.Binary.Put
18+ build-depends:
19+ base >= 4.5.0.0 && < 5,
20+ bytestring >= 0.10.4,
patches/ghc865/containers-0.6.0.1.patchnew file+117
@@ -0,0 +1,117 @@
1+diff --git a/tests/graph-properties.hs b/tests/graph-properties.hs
2+deleted file mode 100644
3+index ffe4483..0000000
4+--- a/tests/graph-properties.hs
5++++ /dev/null
6+@@ -1,111 +0,0 @@
7+-{-# LANGUAGE CPP #-}
8+-
9+-import Data.Graph as G
10+-
11+-import Control.Applicative (Const(Const, getConst), pure, (<$>), (<*>), liftA2)
12+-
13+-import Test.Framework
14+-import Test.Framework.Providers.QuickCheck2
15+-import Test.QuickCheck
16+-import Test.QuickCheck.Function (Fun (..), apply)
17+-import Test.QuickCheck.Poly (A, B, C)
18+-import Control.Monad (ap)
19+-
20+-default (Int)
21+-
22+-main :: IO ()
23+-main = defaultMain
24+- [
25+- testProperty "monad_id1" prop_monad_id1
26+- , testProperty "monad_id2" prop_monad_id2
27+- , testProperty "monad_assoc" prop_monad_assoc
28+- , testProperty "ap_ap" prop_ap_ap
29+- , testProperty "ap_liftA2" prop_ap_liftA2
30+- , testProperty "monadFix_ls" prop_monadFix_ls
31+- ]
32+-
33+-{--------------------------------------------------------------------
34+- Arbitrary trees
35+---------------------------------------------------------------------}
36+-
37+-newtype G = G Graph
38+-
39+--- This instance isn't balanced very well; the trees will probably tend
40+--- to lean left. But it's better than nothing and we can fix it later.
41+-instance Arbitrary a => Arbitrary G where
42+- arbitrary = sized arbgraph
43+- where
44+- arbgraph :: Arbitrary a => Int -> Gen G
45+- arbgraph nv = do
46+- lo <- arbitrary
47+- hi <- (lo+) <$> choose (0, nv)
48+-{-
49+- arbtree 0 = fmap ((,) 1) $ Node <$> arbitrary <*> pure []
50+- arbtree n = do
51+- root <- arbitrary
52+- num_children <- choose (0, n - 1)
53+- (st, tl) <- go num_children
54+- return (1+st, Node root tl)
55+--}
56+-
57+- go 0 = pure (0, [])
58+- go n = do
59+- (sh, hd) <- arbtree n
60+- (st, tl) <- go (n - sh)
61+- pure (sh + st, hd : tl)
62+-
63+--- genericShrink only became available when generics did, so it's
64+--- not available under GHC 7.0.
65+-#if __GLASGOW_HASKELL__ >= 704
66+- shrink = genericShrink
67+-#endif
68+-
69+-----------------------------------------------------------------
70+--- Unit tests
71+-----------------------------------------------------------------
72+-
73+-----------------------------------------------------------------
74+--- QuickCheck
75+-----------------------------------------------------------------
76+-
77+-apply2 :: Fun (a, b) c -> a -> b -> c
78+-apply2 f a b = apply f (a, b)
79+-
80+-prop_ap_ap :: Tree (Fun A B) -> Tree A -> Property
81+-prop_ap_ap fs xs = (apply <$> fs <*> xs) === ((apply <$> fs) `ap` xs)
82+-
83+-prop_ap_liftA2 :: Fun (A, B) C -> Tree A -> Tree B -> Property
84+-prop_ap_liftA2 f as bs = (apply2 f <$> as <*> bs) === liftA2 (apply2 f) as bs
85+-
86+-prop_monad_id1 :: Tree A -> Property
87+-prop_monad_id1 t = (t >>= pure) === t
88+-
89+-prop_monad_id2 :: A -> Fun A (Tree B) -> Property
90+-prop_monad_id2 a f = (pure a >>= apply f) === apply f a
91+-
92+-prop_monad_assoc :: Tree A -> Fun A (Tree B) -> Fun B (Tree C) -> Property
93+-prop_monad_assoc ta atb btc =
94+- ((ta >>= apply atb) >>= apply btc)
95+- ===
96+- (ta >>= \a -> apply atb a >>= apply btc)
97+-
98+--- The left shrinking law
99+---
100+--- This test is kind of wonky and unprincipled, because it's
101+--- rather tricky to construct test cases!
102+--- This is the most important MonadFix law to test because it's the
103+--- least intuitive by far, and because it's the only one that's
104+--- sensitive to the Monad instance.
105+-prop_monadFix_ls :: Int -> Tree Int -> Fun Int (Tree Int) -> Property
106+-prop_monadFix_ls val ta ti =
107+- fmap ($val) (mfix (\x -> ta >>= \y -> f x y))
108+- ===
109+- fmap ($val) (ta >>= \y -> mfix (\x -> f x y))
110+- where
111+- fact :: Int -> (Int -> Int) -> Int -> Int
112+- fact x _ 0 = x + 1
113+- fact x f n = x + n * f ((n - 1) `mod` 23)
114+-
115+- f :: (Int -> Int) -> Int -> Tree (Int -> Int)
116+- f q y = let t = apply ti y
117+- in fmap (\w -> fact w q) t
patches/ghc865/default.nixnew file+7
@@ -0,0 +1,7 @@
1+{
2+ packages.binary.patches = [ ({ version, revision }: if version == "0.8.6.0" && revision == 0 then ./binary-0.8.6.0.patch else null) ];
3+ packages.containers.patches = [ ({ version, revision }: if version == "0.6.0.1" && revision == 0 then ./containers-0.6.0.1.patch else null) ];
4+ packages.hpc.patches = [ ({ version, revision }: if version == "0.6.0.3" && revision == 0 then ./hpc-0.6.0.3.patch else null) ];
5+ packages.parsec.patches = [ ({ version, revision }: if version == "3.1.13.0" && revision == 0 then ./parsec-3.1.13.0.patch else null) ];
6+ packages.unix.patches = [ ({ version, revision }: if version == "2.7.2.2" && revision == 0 then ./unix-2.7.2.2.patch else null) ];
7+}
patches/ghc865/hpc-0.6.0.3.patchnew file+18
@@ -0,0 +1,18 @@
1+diff --git a/hpc.cabal b/hpc.cabal
2+index 7e77973..ba676a7 100644
3+--- a/hpc.cabal
4++++ b/hpc.cabal
5+@@ -35,9 +35,9 @@ Library
6+ Trace.Hpc.Reflect
7+
8+ Build-Depends:
9+- base >= 4.4.1 && < 4.10,
10+- containers >= 0.4.1 && < 0.6,
11+- directory >= 1.1 && < 1.3,
12++ base >= 4.4.1 && < 4.13,
13++ containers >= 0.4.1 && < 0.7,
14++ directory >= 1.1 && < 1.4,
15+ filepath >= 1 && < 1.5,
16+- time >= 1.2 && < 1.7
17++ time >= 1.2 && < 1.9
18+ ghc-options: -Wall
patches/ghc865/parsec-3.1.13.0.patchnew file+36
@@ -0,0 +1,36 @@
1+diff --git a/parsec.cabal b/parsec.cabal
2+index 9531768..46ef625 100644
3+--- a/parsec.cabal
4++++ b/parsec.cabal
5+@@ -21,18 +21,18 @@ license: BSD3
6+ license-file: LICENSE
7+ author: Daan Leijen <daan@microsoft.com>, Paolo Martini <paolo@nemail.it>, Antoine Latter <aslatter@gmail.com>
8+ maintainer: Herbert Valerio Riedel <hvr@gnu.org>
9+-homepage: https://github.com/hvr/parsec
10+-bug-reports: https://github.com/hvr/parsec/issues
11++homepage: https://github.com/haskell/parsec
12++bug-reports: https://github.com/haskell/parsec/issues
13+ category: Parsing
14+
15+ build-type: Simple
16+-tested-with: GHC ==8.4.1 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2
17++tested-with: GHC ==8.6.1 || ==8.4.3 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.4.1
18+
19+ extra-source-files: ChangeLog.md, README.md
20+
21+ source-repository head
22+ type: git
23+- location: https://github.com/hvr/parsec
24++ location: https://github.com/haskell/parsec
25+
26+ library
27+ hs-source-dirs: src
28+@@ -64,7 +64,7 @@ library
29+ Text.ParserCombinators.Parsec.Token
30+
31+ build-depends:
32+- base >= 4.5.1 && < 4.12,
33++ base >= 4.5.0 && < 4.13,
34+ mtl >= 1.1.1 && < 2.3,
35+ bytestring >= 0.9.2.1 && < 0.11,
36+ text >= 0.11.3 && < 1.3
patches/ghc865/unix-2.7.2.2.patchnew file+111
@@ -0,0 +1,111 @@
1+diff --git a/configure b/configure
2+index ea0475d..a3897ae 100644
3+--- a/configure
4++++ b/configure
5+@@ -667,7 +667,6 @@ infodir
6+ docdir
7+ oldincludedir
8+ includedir
9+-runstatedir
10+ localstatedir
11+ sharedstatedir
12+ sysconfdir
13+@@ -739,7 +738,6 @@ datadir='${datarootdir}'
14+ sysconfdir='${prefix}/etc'
15+ sharedstatedir='${prefix}/com'
16+ localstatedir='${prefix}/var'
17+-runstatedir='${localstatedir}/run'
18+ includedir='${prefix}/include'
19+ oldincludedir='/usr/include'
20+ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
21+@@ -992,15 +990,6 @@ do
22+ | -silent | --silent | --silen | --sile | --sil)
23+ silent=yes ;;
24+
25+- -runstatedir | --runstatedir | --runstatedi | --runstated \
26+- | --runstate | --runstat | --runsta | --runst | --runs \
27+- | --run | --ru | --r)
28+- ac_prev=runstatedir ;;
29+- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
30+- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
31+- | --run=* | --ru=* | --r=*)
32+- runstatedir=$ac_optarg ;;
33+-
34+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
35+ ac_prev=sbindir ;;
36+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
37+@@ -1138,7 +1127,7 @@ fi
38+ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
39+ datadir sysconfdir sharedstatedir localstatedir includedir \
40+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
41+- libdir localedir mandir runstatedir
42++ libdir localedir mandir
43+ do
44+ eval ac_val=\$$ac_var
45+ # Remove trailing slashes.
46+@@ -1291,7 +1280,6 @@ Fine tuning of the installation directories:
47+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
48+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
49+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
50+- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
51+ --libdir=DIR object code libraries [EPREFIX/lib]
52+ --includedir=DIR C header files [PREFIX/include]
53+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
54+@@ -3782,7 +3770,7 @@ else
55+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
56+ since some C++ compilers masquerading as C compilers
57+ incorrectly reject 9223372036854775807. */
58+-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
59++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
60+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
61+ && LARGE_OFF_T % 2147483647 == 1)
62+ ? 1 : -1];
63+@@ -3828,7 +3816,7 @@ else
64+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
65+ since some C++ compilers masquerading as C compilers
66+ incorrectly reject 9223372036854775807. */
67+-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
68++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
69+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
70+ && LARGE_OFF_T % 2147483647 == 1)
71+ ? 1 : -1];
72+@@ -3852,7 +3840,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
73+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
74+ since some C++ compilers masquerading as C compilers
75+ incorrectly reject 9223372036854775807. */
76+-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
77++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
78+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
79+ && LARGE_OFF_T % 2147483647 == 1)
80+ ? 1 : -1];
81+@@ -3897,7 +3885,7 @@ else
82+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
83+ since some C++ compilers masquerading as C compilers
84+ incorrectly reject 9223372036854775807. */
85+-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
86++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
87+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
88+ && LARGE_OFF_T % 2147483647 == 1)
89+ ? 1 : -1];
90+@@ -3921,7 +3909,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
91+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
92+ since some C++ compilers masquerading as C compilers
93+ incorrectly reject 9223372036854775807. */
94+-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
95++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
96+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
97+ && LARGE_OFF_T % 2147483647 == 1)
98+ ? 1 : -1];
99+diff --git a/unix.cabal b/unix.cabal
100+index cf44068..bb3155f 100644
101+--- a/unix.cabal
102++++ b/unix.cabal
103+@@ -62,7 +62,7 @@ library
104+ buildable: False
105+
106+ build-depends:
107+- base >= 4.5 && < 4.11,
108++ base >= 4.5 && < 4.13,
109+ bytestring >= 0.9.2 && < 0.11,
110+ time >= 1.2 && < 1.9
111+