2015-01-07 20:31:32 +01:00
{ pkgs }:
2015-01-10 20:26:08 +01:00
with import ./lib.nix { inherit pkgs ; } ;
2015-01-07 20:31:32 +01:00
self : super : {
2015-03-09 20:11:23 +01:00
# LLVM is not supported on this GHC; use the latest one.
inherit ( pkgs ) llvmPackages ;
2015-09-14 16:39:44 +02:00
inherit ( pkgs . haskell . packages . ghc7102 ) jailbreak-cabal alex happy gtk2hs-buildtools ;
2015-03-13 04:20:56 +01:00
# Many packages fail with:
# haddock: internal error: expectJust getPackageDetails
mkDerivation = drv : super . mkDerivation ( drv // { doHaddock = false ; } ) ;
2015-01-07 20:31:32 +01:00
# This is the list of packages that are built into a booted ghcjs installation
# It can be generated with the command:
2015-11-13 01:47:41 +01:00
# nix-shell -p haskell.packages.ghcjs.ghc --command "ghcjs-pkg list | sed -n 's/^ \(.*\)-\([0-9.]*\)$/\1_\2/ p' | sed 's/\./_/g' | sed 's/-\(.\)/\U\1/' | sed 's/^\([^_]*\)\(.*\)$/\1 = null;/'"
2015-01-07 20:31:32 +01:00
Cabal = null ;
aeson = null ;
array = null ;
async = null ;
attoparsec = null ;
base = null ;
binary = null ;
rts = null ;
bytestring = null ;
2015-03-13 04:20:56 +01:00
case-insensitive = null ;
2015-01-07 20:31:32 +01:00
containers = null ;
deepseq = null ;
directory = null ;
dlist = null ;
2015-03-13 04:20:56 +01:00
extensible-exceptions = null ;
2015-01-07 20:31:32 +01:00
filepath = null ;
2015-03-13 04:20:56 +01:00
ghc-prim = null ;
ghcjs-base = null ;
ghcjs-prim = null ;
2015-01-07 20:31:32 +01:00
hashable = null ;
2015-03-13 04:20:56 +01:00
integer-gmp = null ;
2015-01-07 20:31:32 +01:00
mtl = null ;
2015-03-13 04:20:56 +01:00
old-locale = null ;
old-time = null ;
2015-01-07 20:31:32 +01:00
parallel = null ;
pretty = null ;
primitive = null ;
process = null ;
scientific = null ;
stm = null ;
syb = null ;
2015-03-13 04:20:56 +01:00
template-haskell = null ;
2015-01-07 20:31:32 +01:00
text = null ;
time = null ;
transformers = null ;
unix = null ;
2015-03-13 04:20:56 +01:00
unordered-containers = null ;
2015-01-07 20:31:32 +01:00
vector = null ;
2015-10-16 15:12:27 +02:00
# These packages are core libraries in GHC 7.10.x, but not here.
bin-package-db = null ;
haskeline = self . haskeline_0_7_2_1 ;
hoopl = self . hoopl_3_10_2_0 ;
hpc = self . hpc_0_6_0_2 ;
terminfo = self . terminfo_0_4_0_1 ;
xhtml = self . xhtml_3000_2_1 ;
2015-03-13 04:20:56 +01:00
pqueue = overrideCabal super . pqueue ( drv : {
2015-08-06 14:10:48 +02:00
postPatch = ''
2015-03-13 04:20:56 +01:00
sed - i - e ' 1 2 s | null | Data . PQueue . Internals . null | ' Data/PQueue/Internals.hs
sed - i - e ' 6 4 s | null | Data . PQueue . Internals . null | ' Data/PQueue/Internals.hs
sed - i - e ' 3 2 s | null | Data . PQueue . Internals . null | ' Data/PQueue/Min.hs
sed - i - e ' 3 2 s | null | Data . PQueue . Max . null | ' Data/PQueue/Max.hs
sed - i - e ' 4 2 s | null | Data . PQueue . Prio . Internals . null | ' Data/PQueue/Prio/Min.hs
sed - i - e ' 4 2 s | null | Data . PQueue . Prio . Max . null | ' Data/PQueue/Prio/Max.hs
'' ;
} ) ;
transformers-compat = overrideCabal super . transformers-compat ( drv : {
configureFlags = [ ] ;
} ) ;
profunctors = overrideCabal super . profunctors ( drv : {
preConfigure = ''
sed - i ' s / ^ { - # ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
'' ;
} ) ;
2015-04-09 21:00:52 +02:00
ghcjs-dom = overrideCabal super . ghcjs-dom ( drv : {
buildDepends = [ self . base self . mtl self . text self . ghcjs-base ] ;
2015-09-23 05:49:47 +02:00
libraryHaskellDepends = [ ] ;
2015-04-09 21:00:52 +02:00
} ) ;
2015-03-31 15:30:28 +02:00
2015-05-06 21:56:02 +02:00
ghc-paths = overrideCabal super . ghc-paths ( drv : {
2015-08-05 21:48:18 +02:00
patches = [ ./patches/ghc-paths-nix-ghcjs.patch ] ;
2015-05-06 21:56:02 +02:00
} ) ;
2015-09-24 21:11:29 +02:00
# reflex 0.3, made compatible with the newest GHCJS.
reflex = overrideCabal super . reflex ( drv : {
src = pkgs . fetchFromGitHub {
owner = " k 0 0 0 1 " ;
repo = " r e f l e x " ;
rev = " e 9 b 2 f 7 7 7 a d 0 7 8 7 5 1 4 9 6 1 4 e 8 3 3 7 5 0 7 a f d 5 b 1 a 2 4 6 6 " ;
sha256 = " 0 0 5 h r 3 s 6 y 3 6 9 p x f d l i x i 4 w a b g a v 0 b b 6 5 3 j 9 8 7 8 8 k q 9 q 9 s s g i j l w n " ;
} ;
libraryHaskellDepends = [
self . base self . containers self . dependent-map_0_1_1_3
self . dependent-sum_0_2_0_1 self . exception-transformers self . mtl
self . primitive self . ref-tf self . semigroups self . template-haskell
self . these self . transformers self . transformers-compat
] ;
} ) ;
# reflex-dom 0.2, made compatible with the newest GHCJS.
2015-05-08 21:50:48 +02:00
reflex-dom = overrideCabal super . reflex-dom ( drv : {
2015-09-24 21:11:29 +02:00
src = pkgs . fetchFromGitHub {
owner = " k 0 0 0 1 " ;
repo = " r e f l e x - d o m " ;
rev = " a 1 1 7 e a e 8 e 1 0 1 1 9 8 9 7 7 6 1 1 f 8 7 6 0 5 a 5 c b 2 a e 7 5 2 f c 7 " ;
sha256 = " 1 8 m 8 n g 2 f g s f b q d v x 5 j x y 2 3 n d y y h a f n x f l q 8 a p g 5 p s d z 3 a q k f i m z h " ;
} ;
libraryHaskellDepends = [
self . aeson self . base self . bifunctors self . bytestring self . containers
self . data-default self . dependent-map_0_1_1_3 self . dependent-sum_0_2_0_1
self . dependent-sum-template self . directory
self . exception-transformers self . ghcjs-dom self . lens self . mtl self . ref-tf
self . reflex self . safe self . semigroups self . text self . these self . time
self . transformers
2015-05-08 21:50:48 +02:00
] ;
} ) ;
2015-09-24 21:11:29 +02:00
# required by reflex, reflex-dom
dependent-map_0_1_1_3 = self . callPackage (
{ mkDerivation , base , containers , dependent-sum_0_2_0_1 , stdenv
} :
mkDerivation {
pname = " d e p e n d e n t - m a p " ;
version = " 0 . 1 . 1 . 3 " ;
sha256 = " 1 b y 8 3 r r v 8 d f n 5 l x r p x 3 q z s 1 l g 3 1 f h n z l q y 9 7 9 h 8 a m p y x d 0 w 9 3 p a 4 " ;
libraryHaskellDepends = [ base containers dependent-sum_0_2_0_1 ] ;
homepage = " h t t p s : / / g i t h u b . c o m / m o k u s 0 / d e p e n d e n t - m a p " ;
description = " D e p e n d e n t f i n i t e m a p s ( p a r t i a l d e p e n d e n t p r o d u c t s ) " ;
license = " u n k n o w n " ;
}
) { } ;
# required by reflex, reflex-dom
dependent-sum_0_2_0_1 = self . callPackage (
{ mkDerivation , base , stdenv
} :
mkDerivation {
pname = " d e p e n d e n t - s u m " ;
version = " 0 . 2 . 1 . 0 " ;
sha256 = " 1 h 6 w s r h 2 0 6 k 6 q 3 j c f d x v l s s w b m 4 7 x 3 0 p s p 6 x 3 0 l 2 z 0 j 9 j y f 7 j p l 3 " ;
libraryHaskellDepends = [ base ] ;
homepage = " h t t p s : / / g i t h u b . c o m / m o k u s 0 / d e p e n d e n t - s u m " ;
description = " D e p e n d e n t s u m t y p e " ;
license = stdenv . lib . licenses . publicDomain ;
}
) { } ;
# required by reflex-dom
dependent-sum-template = overrideCabal super . dependent-sum-template ( drv : {
libraryHaskellDepends = [
self . base self . dependent-sum_0_2_0_1 self . template-haskell self . th-extras
] ;
} ) ;
2015-01-07 20:31:32 +01:00
}