Merge pull request #20534 from Profpatsch/ghcjs-sort-configuration
Ghcjs sort configuration
This commit is contained in:
commit
786c13c884
|
@ -1,3 +1,7 @@
|
||||||
|
# GHCJS package fixes
|
||||||
|
#
|
||||||
|
# Please insert new packages *alphabetically*
|
||||||
|
# in the OTHER PACKAGES section.
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -9,6 +13,8 @@ with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super:
|
self: super:
|
||||||
|
|
||||||
|
## GENERAL SETUP BASE PACKAGES
|
||||||
|
|
||||||
let # The stage 1 packages
|
let # The stage 1 packages
|
||||||
stage1 = pkgs.lib.genAttrs super.ghc.stage1Packages (pkg: null);
|
stage1 = pkgs.lib.genAttrs super.ghc.stage1Packages (pkg: null);
|
||||||
# The stage 2 packages. Regenerate with ../compilers/ghcjs/gen-stage2.rb
|
# The stage 2 packages. Regenerate with ../compilers/ghcjs/gen-stage2.rb
|
||||||
|
@ -47,24 +53,26 @@ self: super:
|
||||||
terminfo = self.terminfo_0_4_0_1;
|
terminfo = self.terminfo_0_4_0_1;
|
||||||
xhtml = self.xhtml_3000_2_1;
|
xhtml = self.xhtml_3000_2_1;
|
||||||
|
|
||||||
pqueue = overrideCabal super.pqueue (drv: {
|
|
||||||
postPatch = ''
|
## OTHER PACKAGES
|
||||||
sed -i -e '12s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
|
||||||
sed -i -e '64s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
cereal = addBuildDepend super.cereal [ self.fail ];
|
||||||
sed -i -e '32s|null|Data.PQueue.Internals.null|' Data/PQueue/Min.hs
|
|
||||||
sed -i -e '32s|null|Data.PQueue.Max.null|' Data/PQueue/Max.hs
|
entropy = overrideCabal super.entropy (old: {
|
||||||
sed -i -e '42s|null|Data.PQueue.Prio.Internals.null|' Data/PQueue/Prio/Min.hs
|
postPatch = old.postPatch or "" + ''
|
||||||
sed -i -e '42s|null|Data.PQueue.Prio.Max.null|' Data/PQueue/Prio/Max.hs
|
# cabal doesn’t find ghc in this script, since it’s in the bootPkgs
|
||||||
|
sed -e '/Simple.Program/a import Distribution.Simple.Program.Types' \
|
||||||
|
-e 's|mConf.*=.*$|mConf = Just $ simpleConfiguredProgram "ghc" (FoundOnSystem "${self.ghc.bootPkgs.ghc}/bin/ghc")|g' -i Setup.hs
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
transformers-compat = overrideCabal super.transformers-compat (drv: {
|
# https://github.com/kazu-yamamoto/logger/issues/97
|
||||||
configureFlags = [];
|
fast-logger = overrideCabal super.fast-logger (old: {
|
||||||
});
|
postPatch = old.postPatch or "" + ''
|
||||||
|
# remove the Safe extensions, since ghcjs-boot directory
|
||||||
profunctors = overrideCabal super.profunctors (drv: {
|
# doesn’t provide Trustworthy
|
||||||
preConfigure = ''
|
sed -ie '/LANGUAGE Safe/d' System/Log/FastLogger/*.hs
|
||||||
sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
|
cat System/Log/FastLogger/Date.hs
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -98,6 +106,28 @@ self: super:
|
||||||
patches = [ ./patches/ghc-paths-nix-ghcjs.patch ];
|
patches = [ ./patches/ghc-paths-nix-ghcjs.patch ];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
http2 = addBuildDepends super.http2 [ self.aeson self.aeson-pretty self.hex self.unordered-containers self.vector self.word8 ];
|
||||||
|
# ghcjsBoot uses async 2.0.1.6, protolude wants 2.1.*
|
||||||
|
|
||||||
|
pqueue = overrideCabal super.pqueue (drv: {
|
||||||
|
postPatch = ''
|
||||||
|
sed -i -e '12s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
||||||
|
sed -i -e '64s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
||||||
|
sed -i -e '32s|null|Data.PQueue.Internals.null|' Data/PQueue/Min.hs
|
||||||
|
sed -i -e '32s|null|Data.PQueue.Max.null|' Data/PQueue/Max.hs
|
||||||
|
sed -i -e '42s|null|Data.PQueue.Prio.Internals.null|' Data/PQueue/Prio/Min.hs
|
||||||
|
sed -i -e '42s|null|Data.PQueue.Prio.Max.null|' Data/PQueue/Prio/Max.hs
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
profunctors = overrideCabal super.profunctors (drv: {
|
||||||
|
preConfigure = ''
|
||||||
|
sed -i 's/^{-# ANN .* #-}//' src/Data/Profunctor/Unsafe.hs
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
protolude = doJailbreak super.protolude;
|
||||||
|
|
||||||
# reflex 0.3, made compatible with the newest GHCJS.
|
# reflex 0.3, made compatible with the newest GHCJS.
|
||||||
reflex = overrideCabal super.reflex (drv: {
|
reflex = overrideCabal super.reflex (drv: {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
|
@ -122,21 +152,14 @@ self: super:
|
||||||
] drv.libraryHaskellDepends;
|
] drv.libraryHaskellDepends;
|
||||||
});
|
});
|
||||||
|
|
||||||
http2 = addBuildDepends super.http2 [ self.aeson self.aeson-pretty self.hex self.unordered-containers self.vector self.word8 ];
|
|
||||||
# ghcjsBoot uses async 2.0.1.6, protolude wants 2.1.*
|
|
||||||
protolude = doJailbreak super.protolude;
|
|
||||||
semigroups = addBuildDepends super.semigroups [ self.hashable self.unordered-containers self.text self.tagged ];
|
semigroups = addBuildDepends super.semigroups [ self.hashable self.unordered-containers self.text self.tagged ];
|
||||||
# triggers an internal pattern match failure in haddock
|
# triggers an internal pattern match failure in haddock
|
||||||
# https://github.com/haskell/haddock/issues/553
|
# https://github.com/haskell/haddock/issues/553
|
||||||
wai = dontHaddock super.wai;
|
wai = dontHaddock super.wai;
|
||||||
cereal = addBuildDepend super.cereal [ self.fail ];
|
|
||||||
|
|
||||||
entropy = overrideCabal super.entropy (old: {
|
transformers-compat = overrideCabal super.transformers-compat (drv: {
|
||||||
postPatch = old.postPatch or "" + ''
|
configureFlags = [];
|
||||||
# cabal doesn’t find ghc in this script, since it’s in the bootPkgs
|
|
||||||
sed -e '/Simple.Program/a import Distribution.Simple.Program.Types' \
|
|
||||||
-e 's|mConf.*=.*$|mConf = Just $ simpleConfiguredProgram "ghc" (FoundOnSystem "${self.ghc.bootPkgs.ghc}/bin/ghc")|g' -i Setup.hs
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue