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-08-06 15:28:40 +02:00
inherit ( pkgs . haskell . packages . ghc7102 ) jailbreak-cabal alex happy ;
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:
# nix-shell '<nixpkgs>' -A pkgs.haskellPackages_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;/'"
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-03-13 04:20:56 +01:00
pqueue = overrideCabal super . pqueue ( drv : {
patchPhase = ''
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 = [ ] ;
} ) ;
dependent-map = overrideCabal super . dependent-map ( drv : {
preConfigure = ''
sed - i ' s / ^ . * trust base . * $ // ' * . cabal
'' ;
} ) ;
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-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-05-08 21:50:48 +02:00
reflex-dom = overrideCabal super . reflex-dom ( drv : {
buildDepends = [
self . aeson self . base self . bytestring self . containers self . data-default
self . dependent-map self . dependent-sum 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-01-07 20:31:32 +01:00
}