at master 5.4 kB view raw
1{ pkgs, haskellLib }: 2 3self: super: 4 5let 6 inherit (pkgs) lib; 7 8 warnAfterVersion = 9 ver: pkg: 10 lib.warnIf (lib.versionOlder ver 11 super.${pkg.pname}.version 12 ) "override for haskell.packages.ghc912.${pkg.pname} may no longer be needed" pkg; 13 14in 15 16with haskellLib; 17 18{ 19 # Disable GHC core libraries 20 array = null; 21 base = null; 22 binary = null; 23 bytestring = null; 24 Cabal = null; 25 Cabal-syntax = null; 26 containers = null; 27 deepseq = null; 28 directory = null; 29 exceptions = null; 30 file-io = null; 31 filepath = null; 32 ghc-bignum = null; 33 ghc-boot = null; 34 ghc-boot-th = null; 35 ghc-compact = null; 36 ghc-experimental = null; 37 ghc-heap = null; 38 ghc-internal = null; 39 ghc-platform = null; 40 ghc-prim = null; 41 ghc-toolchain = null; 42 ghci = null; 43 haddock-api = null; 44 haddock-library = null; 45 haskeline = null; 46 hpc = null; 47 integer-gmp = null; 48 mtl = null; 49 os-string = null; 50 parsec = null; 51 pretty = null; 52 process = null; 53 rts = null; 54 semaphore-compat = null; 55 stm = null; 56 system-cxx-std-lib = null; 57 template-haskell = null; 58 # GHC only builds terminfo if it is a native compiler 59 terminfo = 60 if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then 61 null 62 else 63 haskellLib.doDistribute self.terminfo_0_4_1_7; 64 text = null; 65 time = null; 66 transformers = null; 67 unix = null; 68 xhtml = null; 69 70 # 71 # Hand pick versions that are compatible with ghc 9.12 and base 4.21 72 # 73 74 extra = doDistribute self.extra_1_8; 75 htree = doDistribute self.htree_0_2_0_0; 76 tagged = doDistribute self.tagged_0_8_9; 77 time-compat = doDistribute self.time-compat_1_9_8; 78 extensions = doDistribute self.extensions_0_1_0_3; 79 doctest = doDistribute self.doctest_0_24_2; # see :/doctest_0_24_2 =/ below 80 ghc-syntax-highlighter = doDistribute self.ghc-syntax-highlighter_0_0_13_0; 81 ghc-lib = doDistribute self.ghc-lib_9_12_2_20250421; 82 ghc-exactprint = doDistribute self.ghc-exactprint_1_12_0_0; 83 ghc-lib-parser = doDistribute self.ghc-lib-parser_9_12_2_20250421; 84 ghc-lib-parser-ex = doDistribute self.ghc-lib-parser-ex_9_12_0_0; 85 hlint = doDistribute self.hlint_3_10; 86 # fourmolu checks require Diff > 1.0, which is not yet supported by various other deps of hls. 87 fourmolu = doDistribute (dontCheck self.fourmolu_0_18_0_0); 88 ormolu = doDistribute self.ormolu_0_8_0_0; 89 stylish-haskell = doDistribute self.stylish-haskell_0_15_1_0; 90 apply-refact = doDistribute self.apply-refact_0_15_0_0; 91 92 # 93 # Jailbreaks 94 # 95 96 large-generics = doJailbreak super.large-generics; # base <4.20 97 time-compat_1_9_8 = doJailbreak super.time-compat_1_9_8; # too strict lower bound on QuickCheck 98 cpphs = overrideCabal (drv: { 99 # jail break manually the conditional dependencies 100 postPatch = '' 101 sed -i 's/time >=1.5 \&\& <1.13/time >=1.5 \&\& <=1.14/g' cpphs.cabal 102 ''; 103 }) super.cpphs; 104 vector = doJailbreak super.vector; # doctest >=0.15 && <0.24 105 cabal-install-parsers = doJailbreak super.cabal-install-parsers; # base, Cabal-syntax, etc. 106 ghc-exactprint_1_12_0_0 = addBuildDepends [ 107 # somehow buildDepends was missing 108 self.Diff 109 self.extra 110 self.ghc-paths 111 self.silently 112 self.syb 113 self.HUnit 114 ] super.ghc-exactprint_1_12_0_0; 115 timezone-series = doJailbreak super.timezone-series; # time <1.14 116 timezone-olson = doJailbreak super.timezone-olson; # time <1.14 117 cabal-plan = doJailbreak super.cabal-plan; # base <4.21 118 dbus = doJailbreak super.dbus; # template-haskell <2.23 119 xmobar = doJailbreak super.xmobar; # base <4.21 120 121 # 122 # Test suite issues 123 # 124 125 call-stack = dontCheck super.call-stack; # https://github.com/sol/call-stack/issues/19 126 127 relude = dontCheck super.relude; 128 129 doctest_0_24_2 = overrideCabal (drv: { 130 testFlags = drv.testFlags or [ ] ++ [ 131 # These tests require cabal-install (would cause infinite recursion) 132 "--skip=/Cabal.Options" 133 "--skip=/Cabal.Paths/paths" 134 "--skip=/Cabal.ReplOptions" # >= 0.23 135 ]; 136 }) super.doctest_0_24_2; 137 138 # https://gitlab.haskell.org/ghc/ghc/-/issues/25930 139 generic-lens = dontCheck super.generic-lens; 140 141 # Cabal 3.14 regression (incorrect datadir in tests): https://github.com/haskell/cabal/issues/10717 142 alex = overrideCabal (drv: { 143 preCheck = drv.preCheck or "" + '' 144 export alex_datadir="$(pwd)/data" 145 ''; 146 }) super.alex; 147 148 # https://github.com/sjakobi/newtype-generics/pull/28/files 149 newtype-generics = warnAfterVersion "0.6.2" (doJailbreak super.newtype-generics); 150 151 # Test failure because of GHC bug: 152 # https://gitlab.haskell.org/ghc/ghc/-/issues/25937 153 # https://github.com/sol/interpolate/issues/20 154 interpolate = 155 assert super.ghc.version == "9.12.2"; 156 dontCheck super.interpolate; 157 158 # 159 # Multiple issues 160 # 161 162 doctest-parallel = overrideCabal (drv: { 163 patches = drv.patches or [ ] ++ [ 164 (pkgs.fetchpatch { 165 name = "doctest-0.23.0-ghc-9.12.patch"; 166 url = "https://github.com/martijnbastiaan/doctest-parallel/commit/d3df7aa5d223f3daeb676c8a7efe093ee743d54f.patch"; 167 sha256 = "sha256-92CtqBCulfOTjLAeC205cIrqL/2CBP1YFLijTVcTD2M="; 168 includes = [ "src/Test/DocTest/Helpers.hs" ]; 169 }) 170 ]; 171 }) (dontCheck (doJailbreak super.doctest-parallel)); # Cabal >=2.4 && <3.13 172 173 haskell-language-server = super.haskell-language-server.override { 174 floskell = null; 175 retrie = null; 176 }; 177 178 # Allow Cabal 3.14 179 hpack = doDistribute self.hpack_0_38_1; 180}