{ungoogled-,}chromium,chromedriver: 130.0.6723.58 -> 130.0.6723.69 (#351519)
[NixPkgs.git] / pkgs / development / haskell-modules / configuration-ghc-9.6.x.nix
blobb6485a111b20e2a1c6e33874b20b57ffd87fc533
1 { pkgs, haskellLib }:
3 with haskellLib;
5 let
6   inherit (pkgs) lib;
8   jailbreakWhileRevision = rev:
9     overrideCabal (old: {
10       jailbreak = assert old.revision or "0" == toString rev; true;
11     });
12   checkAgainAfter = pkg: ver: msg: act:
13     if builtins.compareVersions pkg.version ver <= 0 then act
14     else
15       builtins.throw "Check if '${msg}' was resolved in ${pkg.pname} ${pkg.version} and update or remove this";
16   jailbreakForCurrentVersion = p: v: checkAgainAfter p v "bad bounds" (doJailbreak p);
20 self: super: {
21   llvmPackages = lib.dontRecurseIntoAttrs self.ghc.llvmPackages;
23   # Disable GHC core libraries
24   array = null;
25   base = null;
26   binary = null;
27   bytestring = null;
28   Cabal = null;
29   Cabal-syntax = null;
30   containers = null;
31   deepseq = null;
32   directory = null;
33   exceptions = null;
34   filepath = null;
35   ghc-bignum = null;
36   ghc-boot = null;
37   ghc-boot-th = null;
38   ghc-compact = null;
39   ghc-heap = null;
40   ghc-prim = null;
41   ghci = null;
42   haskeline = null;
43   hpc = null;
44   integer-gmp = null;
45   libiserv = null;
46   mtl = null;
47   parsec = null;
48   pretty = null;
49   process = null;
50   rts = null;
51   stm = null;
52   system-cxx-std-lib = null;
53   template-haskell = null;
54   # terminfo is not built if GHC is a cross compiler
55   terminfo = if pkgs.stdenv.hostPlatform == pkgs.stdenv.buildPlatform then null else doDistribute self.terminfo_0_4_1_6;
56   text = null;
57   time = null;
58   transformers = null;
59   unix = null;
60   xhtml = null;
62   #
63   # Version deviations from Stackage LTS
64   #
66   # Too strict upper bound on template-haskell
67   # https://github.com/mokus0/th-extras/pull/21
68   th-extras = doJailbreak super.th-extras;
70   # not in Stackage, needs to match ghc-lib
71   ghc-tags = doDistribute self.ghc-tags_1_7;
73   #
74   # Too strict bounds without upstream fix
75   #
77   # Forbids transformers >= 0.6
78   quickcheck-classes-base = doJailbreak super.quickcheck-classes-base;
79   # https://github.com/Gabriella439/Haskell-Break-Library/pull/3
80   break = doJailbreak super.break;
81   # Forbids mtl >= 2.3
82   ChasingBottoms = doJailbreak super.ChasingBottoms;
83   # Forbids base >= 4.18
84   cabal-install-solver = doJailbreak super.cabal-install-solver;
85   cabal-install = doJailbreak super.cabal-install;
87   # Forbids base >= 4.18, fix proposed: https://github.com/sjakobi/newtype-generics/pull/25
88   newtype-generics = jailbreakForCurrentVersion super.newtype-generics "0.6.2";
90   # Jailbreaks for servant <0.20
91   servant-lucid = doJailbreak super.servant-lucid;
93   lifted-base = dontCheck super.lifted-base;
94   hw-prim = dontCheck (doJailbreak super.hw-prim);
95   stm-containers = dontCheck super.stm-containers;
96   regex-tdfa = dontCheck super.regex-tdfa;
97   hiedb = dontCheck super.hiedb;
98   retrie = dontCheck super.retrie;
99   # https://github.com/kowainik/relude/issues/436
100   relude = dontCheck (doJailbreak super.relude);
102   inherit (pkgs.lib.mapAttrs (_: doJailbreak ) super)
103     ghc-trace-events
104     gi-cairo-connector          # mtl <2.3
105     ghc-prof                    # base <4.18
106     env-guard                   # doctest <0.21
107     package-version             # doctest <0.21, tasty-hedgehog <1.4
108   ;
110   # Pending text-2.0 support https://github.com/gtk2hs/gtk2hs/issues/327
111   gtk = doJailbreak super.gtk;
113   # 2023-12-23: It needs this to build under ghc-9.6.3.
114   #   A factor of 100 is insufficent, 200 seems seems to work.
115   hip = appendConfigureFlag "--ghc-options=-fsimpl-tick-factor=200" super.hip;
117   # Doctest comments have bogus imports.
118   bsb-http-chunked = dontCheck super.bsb-http-chunked;
120   # This can be removed once https://github.com/typeclasses/ascii-predicates/pull/1
121   # is merged and in a release that's being tracked.
122   ascii-predicates = appendPatch
123     (pkgs.fetchpatch
124       { url = "https://github.com/typeclasses/ascii-predicates/commit/2e6d9ed45987a8566f3a77eedf7836055c076d1a.patch";
125         name = "ascii-predicates-pull-1.patch";
126         relative = "ascii-predicates";
127         sha256 = "sha256-4JguQFZNRQpjZThLrAo13jNeypvLfqFp6o7c1bnkmZo=";
128       })
129     super.ascii-predicates;
131   # This can be removed once https://github.com/typeclasses/ascii-numbers/pull/1
132   # is merged and in a release that's being tracked.
133   ascii-numbers = appendPatch
134     (pkgs.fetchpatch
135       { url = "https://github.com/typeclasses/ascii-numbers/commit/e9474ad91bc997891f1a46afd5d0bdf9b9f7d768.patch";
136         name = "ascii-numbers-pull-1.patch";
137         relative = "ascii-numbers";
138         sha256 = "sha256-buw1UeW57CFefEfqdDUraSyQ+H/NvCZOv6WF2ORiYQg=";
139       })
140     super.ascii-numbers;
142   # Apply patch from PR with mtl-2.3 fix.
143   ConfigFile = overrideCabal (drv: {
144     editedCabalFile = null;
145     buildDepends = drv.buildDepends or [] ++ [ self.HUnit ];
146     patches = [(pkgs.fetchpatch {
147       # https://github.com/jgoerzen/configfile/pull/12
148       name = "ConfigFile-pr-12.patch";
149       url = "https://github.com/jgoerzen/configfile/compare/d0a2e654be0b73eadbf2a50661d00574ad7b6f87...83ee30b43f74d2b6781269072cf5ed0f0e00012f.patch";
150       sha256 = "sha256-b7u9GiIAd2xpOrM0MfILHNb6Nt7070lNRIadn2l3DfQ=";
151     })];
152   }) super.ConfigFile;
154   # Compatibility with core libs of GHC 9.6
155   # Jailbreak to lift bound on time
156   kqueue = doJailbreak (appendPatches [
157     (pkgs.fetchpatch {
158       name = "kqueue-ghc-9.6.patch";
159       url = "https://github.com/hesselink/kqueue/pull/10/commits/a2735e807d761410e776482ec04515d9cf76a7f5.patch";
160       sha256 = "18rilz4nrwcmlvll3acjx2lp7s129pviggb8fy3hdb0z34ls5j84";
161       excludes = [ ".gitignore" ];
162     })
163   ] super.kqueue);
165   # This runs into the following GHC bug currently affecting 9.6.* and 9.8.* as
166   # well as 9.10.1: https://gitlab.haskell.org/ghc/ghc/-/issues/24432
167   inherit (lib.mapAttrs (_: overrideCabal (drv: {
168       badPlatforms = drv.badPlatforms or [ ] ++ [ "aarch64-linux" ];
169     })) super)
170     mueval
171     lambdabot
172     lambdabot-haskell-plugins
173     ;
175   singletons-base = dontCheck super.singletons-base;
177 # super.ghc is required to break infinite recursion as Nix is strict in the attrNames
178 // lib.optionalAttrs (pkgs.stdenv.hostPlatform.isAarch64 && lib.versionOlder super.ghc.version "9.6.4") {
179   # The NCG backend for aarch64 generates invalid jumps in some situations,
180   # the workaround on 9.6 is to revert to the LLVM backend (which is used
181   # for these sorts of situations even on 9.2 and 9.4).
182   # https://gitlab.haskell.org/ghc/ghc/-/issues/23746#note_525318
183   inherit (lib.mapAttrs (_: self.forceLlvmCodegenBackend) super)
184     tls
185     mmark
186     ;