2015-01-07 22:31:32 +03:00
{ pkgs }:
2016-01-25 01:12:03 +03:00
let
removeLibraryHaskellDepends = pnames : depends :
builtins . filter ( e : ! ( builtins . elem ( e . pname or " " ) pnames ) ) depends ;
in
2015-01-10 22:26:08 +03:00
with import ./lib.nix { inherit pkgs ; } ;
2015-01-07 22:31:32 +03:00
2016-02-18 06:07:32 +03:00
self : super :
# The stage 2 packages. Regenerate with ./ghcjs/gen-stage2.rb
let stage2 =
( import ./ghcjs/stage2.nix {
inherit ( self ) callPackage ;
inherit ( self . ghc ) ghcjsBoot ;
} ) ; in stage2 // {
old-time = overrideCabal stage2 . old-time ( drv : {
postPatch = ''
$ { pkgs . autoconf } /bin/autoreconf - - install - - force - - verbose
'' ;
2016-02-25 00:33:07 +03:00
buildTools = pkgs . lib . optional pkgs . stdenv . isDarwin pkgs . darwin . libiconv ;
2016-02-18 06:07:32 +03:00
} ) ;
2016-02-25 00:33:07 +03:00
network = addBuildTools super . network ( pkgs . lib . optional pkgs . stdenv . isDarwin pkgs . darwin . libiconv ) ;
zlib = addBuildTools super . zlib ( pkgs . lib . optional pkgs . stdenv . isDarwin pkgs . darwin . libiconv ) ;
2016-03-15 07:07:59 +03:00
unix-compat = addBuildTools super . unix-compat ( pkgs . lib . optional pkgs . stdenv . isDarwin pkgs . darwin . libiconv ) ;
2016-02-25 00:33:07 +03:00
2015-03-09 22:11:23 +03:00
# LLVM is not supported on this GHC; use the latest one.
inherit ( pkgs ) llvmPackages ;
2016-03-05 23:39:29 +03:00
inherit ( self . ghc . bootPkgs )
jailbreak-cabal alex happy gtk2hs-buildtools rehoo hoogle ;
2015-03-13 06:20:56 +03:00
2016-02-18 06:07:32 +03:00
# This is the list of the Stage 1 packages that are built into a booted ghcjs installation
2015-01-07 22:31:32 +03:00
# It can be generated with the command:
2015-11-13 03:47:41 +03: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 22:31:32 +03:00
array = null ;
base = null ;
binary = null ;
rts = null ;
bytestring = null ;
containers = null ;
deepseq = null ;
directory = null ;
filepath = null ;
2015-03-13 06:20:56 +03:00
ghc-prim = null ;
ghcjs-prim = null ;
integer-gmp = null ;
old-locale = null ;
2015-01-07 22:31:32 +03:00
pretty = null ;
primitive = null ;
process = null ;
2015-03-13 06:20:56 +03:00
template-haskell = null ;
2015-01-07 22:31:32 +03:00
time = null ;
transformers = null ;
unix = null ;
2016-02-19 02:15:14 +03:00
# Don't set integer-simple to null!
# GHCJS uses integer-gmp, so any package expression that depends on
# integer-simple is wrong.
#integer-simple = null;
2015-01-07 22:31:32 +03:00
2015-10-16 16:12:27 +03: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 ;
2016-01-24 21:27:41 +03:00
hoopl = self . hoopl_3_10_2_1 ;
2015-10-16 16:12:27 +03:00
hpc = self . hpc_0_6_0_2 ;
terminfo = self . terminfo_0_4_0_1 ;
xhtml = self . xhtml_3000_2_1 ;
2015-03-13 06:20:56 +03:00
pqueue = overrideCabal super . pqueue ( drv : {
2015-08-06 15:10:48 +03:00
postPatch = ''
2015-03-13 06:20:56 +03: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
'' ;
} ) ;
2016-02-01 10:13:45 +03:00
ghcjs-ffiqq = self . callPackage
( { mkDerivation , base , template-haskell , ghcjs-base , split , containers , text , ghc-prim
} :
mkDerivation {
pname = " g h c j s - f f i q q " ;
version = " 0 . 1 . 0 . 0 " ;
src = pkgs . fetchFromGitHub {
owner = " g h c j s " ;
repo = " g h c j s - f f i q q " ;
rev = " d a 3 1 b 1 8 5 8 2 5 4 2 f c f c e a d e 5 e f 6 b 2 a c a 6 6 6 6 2 b 9 e 2 0 " ;
sha256 = " 1 m k p 8 p 9 h i s p y z v k b 5 v 6 0 7 i h j p 9 1 2 j f i p 6 1 i d 8 d 4 2 i 1 9 k 5 5 4 s s p 8 y " ;
} ;
libraryHaskellDepends = [
base template-haskell ghcjs-base split containers text ghc-prim
] ;
description = " F F I Q u a s i Q u o t e r f o r G H C J S " ;
license = stdenv . lib . licenses . mit ;
} ) { } ;
2015-04-09 22:00:52 +03:00
ghcjs-dom = overrideCabal super . ghcjs-dom ( drv : {
2016-02-18 06:07:32 +03:00
libraryHaskellDepends = [ self . ghcjs-base ] ++
2016-01-25 01:12:03 +03:00
removeLibraryHaskellDepends [
" g l i b " " g t k " " g t k 3 " " w e b k i t g t k " " w e b k i t g t k 3 "
] drv . libraryHaskellDepends ;
2015-04-09 22:00:52 +03:00
} ) ;
2015-03-31 16:30:28 +03:00
2015-05-06 22:56:02 +03:00
ghc-paths = overrideCabal super . ghc-paths ( drv : {
2015-08-05 22:48:18 +03:00
patches = [ ./patches/ghc-paths-nix-ghcjs.patch ] ;
2015-05-06 22:56:02 +03:00
} ) ;
2015-09-24 22:11:29 +03:00
# reflex 0.3, made compatible with the newest GHCJS.
reflex = overrideCabal super . reflex ( drv : {
src = pkgs . fetchFromGitHub {
2016-01-25 01:12:03 +03:00
owner = " r y a n t r i n k l e " ;
2015-09-24 22:11:29 +03:00
repo = " r e f l e x " ;
2016-01-25 01:12:03 +03:00
rev = " c c 6 2 c 1 1 a 6 c d e 3 1 4 1 2 5 8 2 7 5 8 c 2 3 6 9 1 9 d 4 b b 7 6 6 a d a " ;
sha256 = " 1 j 4 v w 0 6 3 6 b k l 4 6 l j 8 r y 1 6 i 0 4 v g p i v j c 6 b s 3 l s 5 4 p p p 1 w f p 6 3 q 7 w 4 " ;
2015-09-24 22:11:29 +03:00
} ;
} ) ;
# reflex-dom 0.2, made compatible with the newest GHCJS.
2015-05-08 22:50:48 +03:00
reflex-dom = overrideCabal super . reflex-dom ( drv : {
2015-09-24 22:11:29 +03:00
src = pkgs . fetchFromGitHub {
2016-01-25 01:12:03 +03:00
owner = " r y a n t r i n k l e " ;
2015-09-24 22:11:29 +03:00
repo = " r e f l e x - d o m " ;
2016-01-25 01:12:03 +03:00
rev = " 6 3 9 d 9 c a 1 3 c 2 d e f 0 7 5 e 8 3 3 4 4 c 9 a f c a 6 e a f a f 2 4 2 1 9 " ;
sha256 = " 0 1 6 6 i h b h 3 d b f j i y m 9 w 5 6 1 s v p g v j 0 x 4 i 8 i 8 w s 7 0 x a a f i 0 c m p s x r a r " ;
2015-09-24 22:11:29 +03:00
} ;
2016-01-25 01:12:03 +03:00
libraryHaskellDepends =
removeLibraryHaskellDepends [
" g l i b " " g t k 3 " " w e b k i t g t k 3 " " w e b k i t g t k 3 - j a v a s c r i p t c o r e " " r a w - s t r i n g s - q q " " u n i x "
] drv . libraryHaskellDepends ;
2015-09-24 22:11:29 +03:00
} ) ;
2015-01-07 22:31:32 +03:00
}