2015-01-07 19:31:32 +00:00
{ pkgs }:
2015-01-10 19:26:08 +00:00
with import ./lib.nix { inherit pkgs ; } ;
2015-01-07 19:31:32 +00:00
self : super : {
2015-03-09 19:11:23 +00:00
# LLVM is not supported on this GHC; use the latest one.
inherit ( pkgs ) llvmPackages ;
2015-04-09 18:59:57 +00:00
inherit ( pkgs . haskell-ng . packages . ghc7101 ) jailbreak-cabal alex happy ;
2015-03-13 03:20:56 +00:00
# Many packages fail with:
# haddock: internal error: expectJust getPackageDetails
mkDerivation = drv : super . mkDerivation ( drv // { doHaddock = false ; } ) ;
2015-01-07 19:31:32 +00: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 03:20:56 +00:00
case-insensitive = null ;
2015-01-07 19:31:32 +00:00
containers = null ;
deepseq = null ;
directory = null ;
dlist = null ;
2015-03-13 03:20:56 +00:00
extensible-exceptions = null ;
2015-01-07 19:31:32 +00:00
filepath = null ;
2015-03-13 03:20:56 +00:00
ghc-prim = null ;
ghcjs-base = null ;
ghcjs-prim = null ;
2015-01-07 19:31:32 +00:00
hashable = null ;
2015-03-13 03:20:56 +00:00
integer-gmp = null ;
2015-01-07 19:31:32 +00:00
mtl = null ;
2015-03-13 03:20:56 +00:00
old-locale = null ;
old-time = null ;
2015-01-07 19:31:32 +00:00
parallel = null ;
pretty = null ;
primitive = null ;
process = null ;
scientific = null ;
stm = null ;
syb = null ;
2015-03-13 03:20:56 +00:00
template-haskell = null ;
2015-01-07 19:31:32 +00:00
text = null ;
time = null ;
transformers = null ;
unix = null ;
2015-03-13 03:20:56 +00:00
unordered-containers = null ;
2015-01-07 19:31:32 +00:00
vector = null ;
2015-03-13 03:20:56 +00: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
'' ;
} ) ;
reactive-banana = overrideCabal super . reactive-banana ( drv : {
patchPhase = ''
cat > > src/Reactive/Banana/Switch.hs < < EOF
instance Functor ( AnyMoment Identity ) where
fmap = liftM
instance Applicative ( AnyMoment Identity ) where
pure = return
( < * > ) = ap
EOF
'' ;
} ) ;
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 19:00:52 +00:00
ghcjs-dom = overrideCabal super . ghcjs-dom ( drv : {
buildDepends = [ self . base self . mtl self . text self . ghcjs-base ] ;
} ) ;
2015-01-07 19:31:32 +00:00
}