at master 2.6 kB view raw
1{ pkgs, haskellLib }: 2 3self: super: 4 5with haskellLib; 6 7let 8 inherit (pkgs.stdenv.hostPlatform) isDarwin; 9 inherit (pkgs) lib; 10 11 warnAfterVersion = 12 ver: pkg: 13 lib.warnIf (lib.versionOlder ver 14 super.${pkg.pname}.version 15 ) "override for haskell.packages.ghc912.${pkg.pname} may no longer be needed" pkg; 16 17in 18 19{ 20 21 # Disable GHC core libraries. 22 array = null; 23 base = null; 24 binary = null; 25 bytestring = null; 26 Cabal = null; 27 Cabal-syntax = null; 28 containers = null; 29 deepseq = null; 30 directory = null; 31 exceptions = null; 32 filepath = null; 33 ghc-bignum = null; 34 ghc-boot = null; 35 ghc-boot-th = null; 36 ghc-compact = null; 37 ghc-heap = null; 38 ghc-prim = null; 39 ghci = null; 40 haskeline = null; 41 hpc = null; 42 integer-gmp = null; 43 libiserv = null; 44 mtl = null; 45 parsec = null; 46 pretty = null; 47 process = null; 48 rts = null; 49 stm = null; 50 semaphore-compat = null; 51 system-cxx-std-lib = null; 52 template-haskell = null; 53 # GHC only builds terminfo if it is a native compiler 54 terminfo = 55 if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then 56 null 57 else 58 doDistribute self.terminfo_0_4_1_7; 59 text = null; 60 time = null; 61 transformers = null; 62 unix = null; 63 xhtml = null; 64 65 # 66 # Version upgrades 67 # 68 megaparsec = doDistribute self.megaparsec_9_7_0; 69 ghc-tags = self.ghc-tags_1_8; 70 71 # 72 # Jailbreaks 73 # 74 hashing = doJailbreak super.hashing; # bytestring <0.12 75 hevm = appendPatch (pkgs.fetchpatch { 76 url = "https://github.com/hellwolf/hevm/commit/338674d1fe22d46ea1e8582b24c224d76d47d0f3.patch"; 77 name = "release-0.54.2-ghc-9.8.4-patch"; 78 sha256 = "sha256-Mo65FfP1nh7QTY+oLia22hj4eV2v9hpXlYsrFKljA3E="; 79 }) super.hevm; 80 HaskellNet-SSL = doJailbreak super.HaskellNet-SSL; # bytestring >=0.9 && <0.12 81 inflections = doJailbreak super.inflections; # text >=0.2 && <2.1 82 83 # 84 # Test suite issues 85 # 86 pcre-heavy = dontCheck super.pcre-heavy; # GHC warnings cause the tests to fail 87 88 # 89 # Other build fixes 90 # 91 92 # 2023-12-23: It needs this to build under ghc-9.6.3. 93 # A factor of 100 is insufficient, 200 seems seems to work. 94 hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip; 95 96 # 2025-04-21: "flavor" for GHC 9.8.5 is missing a fix introduced for 9.8.4. See: 97 # https://github.com/digital-asset/ghc-lib/pull/571#discussion_r2052684630 98 ghc-lib-parser = warnAfterVersion "9.8.5.20250214" ( 99 overrideCabal { 100 postPatch = '' 101 substituteInPlace compiler/cbits/genSym.c \ 102 --replace-fail "HsWord64 u = atomic_inc64" "HsWord64 u = atomic_inc" 103 ''; 104 } super.ghc-lib-parser 105 ); 106}