2015-01-07 22:31:32 +03:00
{ pkgs }:
2015-01-10 22:26:08 +03:00
with import ./lib.nix { inherit pkgs ; } ;
2015-01-07 22:31:32 +03:00
self : super : {
2015-03-09 22:11:23 +03:00
# LLVM is not supported on this GHC; use the latest one.
inherit ( pkgs ) llvmPackages ;
2015-03-13 06:20:56 +03:00
jailbreak-cabal = pkgs . haskell-ng . packages . ghc7101 . jailbreak-cabal ;
# Many packages fail with:
# haddock: internal error: expectJust getPackageDetails
mkDerivation = drv : super . mkDerivation ( drv // { doHaddock = false ; } ) ;
2015-01-07 22:31:32 +03: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 06:20:56 +03:00
case-insensitive = null ;
2015-01-07 22:31:32 +03:00
containers = null ;
deepseq = null ;
directory = null ;
dlist = null ;
2015-03-13 06:20:56 +03:00
extensible-exceptions = null ;
2015-01-07 22:31:32 +03:00
filepath = null ;
2015-03-13 06:20:56 +03:00
ghc-prim = null ;
ghcjs-base = null ;
ghcjs-prim = null ;
2015-01-07 22:31:32 +03:00
hashable = null ;
2015-03-13 06:20:56 +03:00
integer-gmp = null ;
2015-01-07 22:31:32 +03:00
mtl = null ;
2015-03-13 06:20:56 +03:00
old-locale = null ;
old-time = null ;
2015-01-07 22:31:32 +03:00
parallel = null ;
pretty = null ;
primitive = null ;
process = null ;
scientific = null ;
stm = null ;
syb = null ;
2015-03-13 06:20:56 +03:00
template-haskell = null ;
2015-01-07 22:31:32 +03:00
text = null ;
time = null ;
transformers = null ;
unix = null ;
2015-03-13 06:20:56 +03:00
unordered-containers = null ;
2015-01-07 22:31:32 +03:00
vector = null ;
2015-03-13 06:20:56 +03: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
'' ;
} ) ;
" g h c j s - d o m " = self . callPackage
( { mkDerivation , base , mtl , text , ghcjs-base
} :
mkDerivation {
pname = " g h c j s - d o m " ;
version = " 0 . 1 . 1 . 3 " ;
sha256 = " 0 p d x b 2 s 7 f f l r h 8 s b q a k v 0 q i 1 3 j k n 3 d 0 y c 3 2 x h g 2 9 4 4 y f j g 5 f v l l y " ;
buildDepends = [ base mtl text ghcjs-base ] ;
description = " D O M l i b r a r y t h a t s u p p o r t s b o t h G H C J S a n d W e b K i t G T K " ;
license = pkgs . stdenv . lib . licenses . mit ;
hydraPlatforms = pkgs . stdenv . lib . platforms . none ;
} ) { } ;
2015-01-07 22:31:32 +03:00
}