Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / top-level / haskell-packages.nix
blob24a8e979b0203509862fa876a7350da29d892172
1 { buildPackages, pkgsBuildTarget, pkgs, newScope, stdenv }:
3 let
4   # These are attributes in compiler that support integer-simple.
5   integerSimpleIncludes = [
6     "ghc88"
7     "ghc884"
8     "ghc810"
9     "ghc8107"
10   ];
12   nativeBignumExcludes = integerSimpleIncludes ++ [
13     # haskell.compiler sub groups
14     "integer-simple"
15     "native-bignum"
16     # Binary GHCs
17     "ghc865Binary"
18     "ghc8107Binary"
19     "ghc924Binary"
20     "ghc963Binary"
21     # ghcjs
22     "ghcjs"
23     "ghcjs810"
24   ];
26   haskellLibUncomposable = import ../development/haskell-modules/lib {
27     inherit (pkgs) lib;
28     inherit pkgs;
29   };
31   callPackage = newScope {
32     haskellLib = haskellLibUncomposable.compose;
33     overrides = pkgs.haskell.packageOverrides;
34   };
36   bootstrapPackageSet = self: super: {
37     mkDerivation = drv: super.mkDerivation (drv // {
38       doCheck = false;
39       doHaddock = false;
40       enableExecutableProfiling = false;
41       enableLibraryProfiling = false;
42       enableSharedExecutables = false;
43       enableSharedLibraries = false;
44     });
45   };
47   # Use this rather than `rec { ... }` below for sake of overlays.
48   inherit (pkgs.haskell) compiler packages;
50 in {
51   lib = haskellLibUncomposable;
53   package-list = callPackage ../development/haskell-modules/package-list.nix {};
55   compiler = {
56     ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix {
57       # Should be llvmPackages_6 which has been removed from nixpkgs
58       llvmPackages = null;
59     };
61     ghc8107Binary = callPackage ../development/compilers/ghc/8.10.7-binary.nix {
62       llvmPackages = pkgs.llvmPackages_12;
63     };
65     ghc924Binary = callPackage ../development/compilers/ghc/9.2.4-binary.nix {
66       llvmPackages = pkgs.llvmPackages_12;
67     };
69     ghc963Binary = callPackage ../development/compilers/ghc/9.6.3-binary.nix {
70       llvmPackages = pkgs.llvmPackages_15;
71     };
73     ghc8107 = callPackage ../development/compilers/ghc/8.10.7.nix {
74       bootPkgs =
75         # the oldest ghc with aarch64-darwin support is 8.10.5
76         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
77           # to my (@a-m-joseph) knowledge there are no newer official binaries for this platform
78           packages.ghc865Binary
79         else
80           packages.ghc8107Binary;
81       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
82       python3 = buildPackages.python311; # so that we don't have two of them
83       # Need to use apple's patched xattr until
84       # https://github.com/xattr/xattr/issues/44 and
85       # https://github.com/xattr/xattr/issues/55 are solved.
86       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
87       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
88       llvmPackages = pkgs.llvmPackages_12;
89     };
90     ghc810 = compiler.ghc8107;
91     ghc902 = callPackage ../development/compilers/ghc/9.0.2.nix {
92       bootPkgs =
93         # the oldest ghc with aarch64-darwin support is 8.10.5
94         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
95           packages.ghc810
96         else
97           packages.ghc8107Binary;
98       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
99       python3 = buildPackages.python311; # so that we don't have two of them
100       inherit (buildPackages.darwin) autoSignDarwinBinariesHook xattr;
101       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
102       llvmPackages = pkgs.llvmPackages_12;
103     };
104     ghc90 = compiler.ghc902;
105     ghc925 = callPackage ../development/compilers/ghc/9.2.5.nix {
106       bootPkgs =
107         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
108           packages.ghc810
109         else
110           packages.ghc8107Binary;
111       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
112       python3 = buildPackages.python311; # so that we don't have two of them
113       # Need to use apple's patched xattr until
114       # https://github.com/xattr/xattr/issues/44 and
115       # https://github.com/xattr/xattr/issues/55 are solved.
116       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
117       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
118       llvmPackages = pkgs.llvmPackages_12;
119     };
120     ghc926 = callPackage ../development/compilers/ghc/9.2.6.nix {
121       bootPkgs =
122         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
123           packages.ghc810
124         else
125           packages.ghc8107Binary;
126       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
127       python3 = buildPackages.python311; # so that we don't have two of them
128       # Need to use apple's patched xattr until
129       # https://github.com/xattr/xattr/issues/44 and
130       # https://github.com/xattr/xattr/issues/55 are solved.
131       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
132       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
133       llvmPackages = pkgs.llvmPackages_12;
134     };
135     ghc927 = callPackage ../development/compilers/ghc/9.2.7.nix {
136       bootPkgs =
137         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
138           packages.ghc810
139         else
140           packages.ghc8107Binary;
141       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
142       python3 = buildPackages.python311; # so that we don't have two of them
143       # Need to use apple's patched xattr until
144       # https://github.com/xattr/xattr/issues/44 and
145       # https://github.com/xattr/xattr/issues/55 are solved.
146       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
147       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
148       llvmPackages = pkgs.llvmPackages_12;
149     };
150     ghc928 = callPackage ../development/compilers/ghc/9.2.8.nix {
151       bootPkgs =
152         if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
153           packages.ghc810
154         else
155           packages.ghc8107Binary;
156       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
157       python3 = buildPackages.python311; # so that we don't have two of them
158       # Need to use apple's patched xattr until
159       # https://github.com/xattr/xattr/issues/44 and
160       # https://github.com/xattr/xattr/issues/55 are solved.
161       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
162       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
163       llvmPackages = pkgs.llvmPackages_12;
164     };
165     ghc92 = compiler.ghc928;
166     ghc945 = callPackage ../development/compilers/ghc/9.4.5.nix {
167       bootPkgs =
168         # Building with 9.2 is broken due to
169         # https://gitlab.haskell.org/ghc/ghc/-/issues/21914
170         # Use 8.10 as a workaround where possible to keep bootstrap path short.
172         # On ARM text won't build with GHC 8.10.*
173         if stdenv.hostPlatform.isAarch then
174           # TODO(@sternenseemann): package bindist
175           packages.ghc902
176         # No suitable bindists for powerpc64le
177         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
178           packages.ghc902
179         else
180           packages.ghc8107Binary;
181       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
182       python3 = buildPackages.python311; # so that we don't have two of them
183       # Need to use apple's patched xattr until
184       # https://github.com/xattr/xattr/issues/44 and
185       # https://github.com/xattr/xattr/issues/55 are solved.
186       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
187       # Support range >= 10 && < 14
188       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
189       llvmPackages = pkgs.llvmPackages_12;
190     };
191     ghc946 = callPackage ../development/compilers/ghc/9.4.6.nix {
192       bootPkgs =
193         # Building with 9.2 is broken due to
194         # https://gitlab.haskell.org/ghc/ghc/-/issues/21914
195         # Use 8.10 as a workaround where possible to keep bootstrap path short.
197         # On ARM text won't build with GHC 8.10.*
198         if stdenv.hostPlatform.isAarch then
199           # TODO(@sternenseemann): package bindist
200           packages.ghc902
201         # No suitable bindists for powerpc64le
202         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
203           packages.ghc902
204         else
205           packages.ghc8107Binary;
206       inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
207       python3 = buildPackages.python311; # so that we don't have two of them
208       # Need to use apple's patched xattr until
209       # https://github.com/xattr/xattr/issues/44 and
210       # https://github.com/xattr/xattr/issues/55 are solved.
211       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
212       # Support range >= 10 && < 14
213       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
214       llvmPackages = pkgs.llvmPackages_12;
215     };
216     ghc947 = callPackage ../development/compilers/ghc/9.4.7.nix {
217       bootPkgs =
218         # Building with 9.2 is broken due to
219         # https://gitlab.haskell.org/ghc/ghc/-/issues/21914
220         # Use 8.10 as a workaround where possible to keep bootstrap path short.
222         # On ARM text won't build with GHC 8.10.*
223         if stdenv.hostPlatform.isAarch then
224           # TODO(@sternenseemann): package bindist
225           packages.ghc902
226         # No suitable bindists for powerpc64le
227         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
228           packages.ghc902
229         else
230           packages.ghc8107Binary;
231       inherit (buildPackages.python3Packages) sphinx;
232       # Need to use apple's patched xattr until
233       # https://github.com/xattr/xattr/issues/44 and
234       # https://github.com/xattr/xattr/issues/55 are solved.
235       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
236       # Support range >= 10 && < 14
237       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
238       llvmPackages = pkgs.llvmPackages_12;
239     };
240     ghc948 = callPackage ../development/compilers/ghc/9.4.8.nix {
241       bootPkgs =
242         # Building with 9.2 is broken due to
243         # https://gitlab.haskell.org/ghc/ghc/-/issues/21914
244         # Use 8.10 as a workaround where possible to keep bootstrap path short.
246         # On ARM text won't build with GHC 8.10.*
247         if stdenv.hostPlatform.isAarch then
248           # TODO(@sternenseemann): package bindist
249           packages.ghc902
250         # No suitable bindists for powerpc64le
251         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
252           packages.ghc902
253         else
254           packages.ghc8107Binary;
255       inherit (buildPackages.python3Packages) sphinx;
256       # Need to use apple's patched xattr until
257       # https://github.com/xattr/xattr/issues/44 and
258       # https://github.com/xattr/xattr/issues/55 are solved.
259       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
260       # Support range >= 10 && < 14
261       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
262       llvmPackages = pkgs.llvmPackages_12;
263     };
264     ghc94 = compiler.ghc948;
265     ghc963 = callPackage ../development/compilers/ghc/9.6.3.nix {
266       bootPkgs =
267         # For GHC 9.2 no armv7l bindists are available.
268         if stdenv.hostPlatform.isAarch32 then
269           packages.ghc928
270         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
271           packages.ghc928
272         else
273           packages.ghc924Binary;
274       inherit (buildPackages.python3Packages) sphinx;
275       # Need to use apple's patched xattr until
276       # https://github.com/xattr/xattr/issues/44 and
277       # https://github.com/xattr/xattr/issues/55 are solved.
278       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
279       # Support range >= 11 && < 16
280       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
281       llvmPackages = pkgs.llvmPackages_15;
282     };
283     ghc964 = callPackage ../development/compilers/ghc/9.6.4.nix {
284       bootPkgs =
285         # For GHC 9.2 no armv7l bindists are available.
286         if stdenv.hostPlatform.isAarch32 then
287           packages.ghc928
288         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
289           packages.ghc928
290         else
291           packages.ghc924Binary;
292       inherit (buildPackages.python3Packages) sphinx;
293       # Need to use apple's patched xattr until
294       # https://github.com/xattr/xattr/issues/44 and
295       # https://github.com/xattr/xattr/issues/55 are solved.
296       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
297       # Support range >= 11 && < 16
298       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
299       llvmPackages = pkgs.llvmPackages_15;
300     };
301     ghc965 = callPackage ../development/compilers/ghc/9.6.5.nix {
302       bootPkgs =
303         # For GHC 9.2 no armv7l bindists are available.
304         if stdenv.hostPlatform.isAarch32 then
305           packages.ghc928
306         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
307           packages.ghc928
308         else
309           packages.ghc924Binary;
310       inherit (buildPackages.python3Packages) sphinx;
311       # Need to use apple's patched xattr until
312       # https://github.com/xattr/xattr/issues/44 and
313       # https://github.com/xattr/xattr/issues/55 are solved.
314       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
315       # Support range >= 11 && < 16
316       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
317       llvmPackages = pkgs.llvmPackages_15;
318     };
319     ghc966 = callPackage ../development/compilers/ghc/9.6.6.nix {
320       bootPkgs =
321         # For GHC 9.2 no armv7l bindists are available.
322         if stdenv.hostPlatform.isAarch32 then
323           packages.ghc928
324         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
325           packages.ghc928
326         else
327           packages.ghc924Binary;
328       inherit (buildPackages.python3Packages) sphinx;
329       # Need to use apple's patched xattr until
330       # https://github.com/xattr/xattr/issues/44 and
331       # https://github.com/xattr/xattr/issues/55 are solved.
332       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
333       # Support range >= 11 && < 16
334       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
335       llvmPackages = pkgs.llvmPackages_15;
336     };
337     ghc96 = compiler.ghc965;
338     ghc981 = callPackage ../development/compilers/ghc/9.8.1.nix {
339       bootPkgs =
340         # For GHC 9.6 no armv7l bindists are available.
341         if stdenv.hostPlatform.isAarch32 then
342           packages.ghc963
343         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
344           packages.ghc963
345         else if stdenv.hostPlatform.isDarwin then
346           # it seems like the GHC 9.6.* bindists are built with a different
347           # toolchain than we are using (which I'm guessing from the fact
348           # that 9.6.4 bindists pass linker flags our ld doesn't support).
349           # With both 9.6.3 and 9.6.4 binary it is impossible to link against
350           # the clock package (probably a hsc2hs problem).
351           packages.ghc963
352         else
353           packages.ghc963Binary;
354       inherit (buildPackages.python3Packages) sphinx;
355       # Need to use apple's patched xattr until
356       # https://github.com/xattr/xattr/issues/44 and
357       # https://github.com/xattr/xattr/issues/55 are solved.
358       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
359       # Support range >= 11 && < 16
360       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
361       llvmPackages = pkgs.llvmPackages_15;
362     };
363     ghc982 = callPackage ../development/compilers/ghc/9.8.2.nix {
364       bootPkgs =
365         # For GHC 9.6 no armv7l bindists are available.
366         if stdenv.hostPlatform.isAarch32 then
367           packages.ghc963
368         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
369           packages.ghc963
370         else if stdenv.hostPlatform.isDarwin then
371           # it seems like the GHC 9.6.* bindists are built with a different
372           # toolchain than we are using (which I'm guessing from the fact
373           # that 9.6.4 bindists pass linker flags our ld doesn't support).
374           # With both 9.6.3 and 9.6.4 binary it is impossible to link against
375           # the clock package (probably a hsc2hs problem).
376           packages.ghc963
377         else
378           packages.ghc963Binary;
379       inherit (buildPackages.python3Packages) sphinx;
380       # Need to use apple's patched xattr until
381       # https://github.com/xattr/xattr/issues/44 and
382       # https://github.com/xattr/xattr/issues/55 are solved.
383       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
384       # Support range >= 11 && < 16
385       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
386       llvmPackages = pkgs.llvmPackages_15;
387     };
388     ghc98 = compiler.ghc982;
389     ghc9101 = callPackage ../development/compilers/ghc/9.10.1.nix {
390       bootPkgs =
391         # For GHC 9.6 no armv7l bindists are available.
392         if stdenv.hostPlatform.isAarch32 then
393           packages.ghc963
394         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
395           packages.ghc963
396         else if stdenv.hostPlatform.isDarwin then
397           # it seems like the GHC 9.6.* bindists are built with a different
398           # toolchain than we are using (which I'm guessing from the fact
399           # that 9.6.4 bindists pass linker flags our ld doesn't support).
400           # With both 9.6.3 and 9.6.4 binary it is impossible to link against
401           # the clock package (probably a hsc2hs problem).
402           packages.ghc963
403         else
404           packages.ghc963Binary;
405       inherit (buildPackages.python3Packages) sphinx;
406       # Need to use apple's patched xattr until
407       # https://github.com/xattr/xattr/issues/44 and
408       # https://github.com/xattr/xattr/issues/55 are solved.
409       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
410       # 2023-01-15: Support range >= 11 && < 16
411       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
412       llvmPackages = pkgs.llvmPackages_15;
413     };
414     ghc910 = compiler.ghc9101;
415     ghcHEAD = callPackage ../development/compilers/ghc/head.nix {
416       bootPkgs =
417         # For GHC 9.6 no armv7l bindists are available.
418         if stdenv.hostPlatform.isAarch32 then
419           packages.ghc963
420         else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then
421           packages.ghc963
422         else if stdenv.hostPlatform.isDarwin then
423           # it seems like the GHC 9.6.* bindists are built with a different
424           # toolchain than we are using (which I'm guessing from the fact
425           # that 9.6.4 bindists pass linker flags our ld doesn't support).
426           # With both 9.6.3 and 9.6.4 binary it is impossible to link against
427           # the clock package (probably a hsc2hs problem).
428           packages.ghc963
429         else
430           packages.ghc963Binary;
431       inherit (buildPackages.python3Packages) sphinx;
432       # Need to use apple's patched xattr until
433       # https://github.com/xattr/xattr/issues/44 and
434       # https://github.com/xattr/xattr/issues/55 are solved.
435       inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
436       # 2023-01-15: Support range >= 11 && < 16
437       buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_15;
438       llvmPackages = pkgs.llvmPackages_15;
439     };
441     ghcjs = compiler.ghcjs810;
442     ghcjs810 = callPackage ../development/compilers/ghcjs/8.10 {
443       bootPkgs = packages.ghc810;
444       ghcjsSrcJson = ../development/compilers/ghcjs/8.10/git.json;
445       stage0 = ../development/compilers/ghcjs/8.10/stage0.nix;
446     };
448     # The integer-simple attribute set contains all the GHC compilers
449     # build with integer-simple instead of integer-gmp.
450     integer-simple = let
451       integerSimpleGhcNames = pkgs.lib.filter
452         (name: builtins.elem name integerSimpleIncludes)
453         (pkgs.lib.attrNames compiler);
454     in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
455       integerSimpleGhcNames
456       (name: compiler.${name}.override { enableIntegerSimple = true; }));
458     # Starting from GHC 9, integer-{simple,gmp} is replaced by ghc-bignum
459     # with "native" and "gmp" backends.
460     native-bignum = let
461       nativeBignumGhcNames = pkgs.lib.filter
462         (name: !(builtins.elem name nativeBignumExcludes))
463         (pkgs.lib.attrNames compiler);
464     in pkgs.recurseIntoAttrs (pkgs.lib.genAttrs
465       nativeBignumGhcNames
466       (name: compiler.${name}.override { enableNativeBignum = true; }));
467   };
469   # Default overrides that are applied to all package sets.
470   packageOverrides = self : super : {};
472   # Always get compilers from `buildPackages`
473   packages = let bh = buildPackages.haskell; in {
475     ghc865Binary = callPackage ../development/haskell-modules {
476       buildHaskellPackages = bh.packages.ghc865Binary;
477       ghc = bh.compiler.ghc865Binary;
478       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.6.x.nix { };
479       packageSetConfig = bootstrapPackageSet;
480     };
481     ghc8107Binary = callPackage ../development/haskell-modules {
482       buildHaskellPackages = bh.packages.ghc8107Binary;
483       ghc = bh.compiler.ghc8107Binary;
484       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
485       packageSetConfig = bootstrapPackageSet;
486     };
487     ghc924Binary = callPackage ../development/haskell-modules {
488       buildHaskellPackages = bh.packages.ghc924Binary;
489       ghc = bh.compiler.ghc924Binary;
490       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
491       packageSetConfig = bootstrapPackageSet;
492     };
493     ghc963Binary = callPackage ../development/haskell-modules {
494       buildHaskellPackages = bh.packages.ghc963Binary;
495       ghc = bh.compiler.ghc963Binary;
496       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
497       packageSetConfig = bootstrapPackageSet;
498     };
499     ghc8107 = callPackage ../development/haskell-modules {
500       buildHaskellPackages = bh.packages.ghc8107;
501       ghc = bh.compiler.ghc8107;
502       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
503     };
504     ghc810 = packages.ghc8107;
505     ghc902 = callPackage ../development/haskell-modules {
506       buildHaskellPackages = bh.packages.ghc902;
507       ghc = bh.compiler.ghc902;
508       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.0.x.nix { };
509     };
510     ghc90 = packages.ghc902;
511     ghc925 = callPackage ../development/haskell-modules {
512       buildHaskellPackages = bh.packages.ghc925;
513       ghc = bh.compiler.ghc925;
514       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
515     };
516     ghc926 = callPackage ../development/haskell-modules {
517       buildHaskellPackages = bh.packages.ghc926;
518       ghc = bh.compiler.ghc926;
519       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
520     };
521     ghc927 = callPackage ../development/haskell-modules {
522       buildHaskellPackages = bh.packages.ghc927;
523       ghc = bh.compiler.ghc927;
524       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
525     };
526     ghc928 = callPackage ../development/haskell-modules {
527       buildHaskellPackages = bh.packages.ghc928;
528       ghc = bh.compiler.ghc928;
529       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
530     };
531     ghc92 = packages.ghc928;
532     ghc945 = callPackage ../development/haskell-modules {
533       buildHaskellPackages = bh.packages.ghc945;
534       ghc = bh.compiler.ghc945;
535       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
536     };
537     ghc946 = callPackage ../development/haskell-modules {
538       buildHaskellPackages = bh.packages.ghc946;
539       ghc = bh.compiler.ghc946;
540       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
541     };
542     ghc947 = callPackage ../development/haskell-modules {
543       buildHaskellPackages = bh.packages.ghc947;
544       ghc = bh.compiler.ghc947;
545       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
546     };
547     ghc948 = callPackage ../development/haskell-modules {
548       buildHaskellPackages = bh.packages.ghc948;
549       ghc = bh.compiler.ghc948;
550       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.4.x.nix { };
551     };
552     ghc94 = packages.ghc948;
553     ghc963 = callPackage ../development/haskell-modules {
554       buildHaskellPackages = bh.packages.ghc963;
555       ghc = bh.compiler.ghc963;
556       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
557     };
558     ghc964 = callPackage ../development/haskell-modules {
559       buildHaskellPackages = bh.packages.ghc964;
560       ghc = bh.compiler.ghc964;
561       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
562     };
563     ghc965 = callPackage ../development/haskell-modules {
564       buildHaskellPackages = bh.packages.ghc965;
565       ghc = bh.compiler.ghc965;
566       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
567     };
568     ghc966 = callPackage ../development/haskell-modules {
569       buildHaskellPackages = bh.packages.ghc966;
570       ghc = bh.compiler.ghc966;
571       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.6.x.nix { };
572     };
573     ghc96 = packages.ghc965;
574     ghc981 = callPackage ../development/haskell-modules {
575       buildHaskellPackages = bh.packages.ghc981;
576       ghc = bh.compiler.ghc981;
577       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
578     };
579     ghc982 = callPackage ../development/haskell-modules {
580       buildHaskellPackages = bh.packages.ghc982;
581       ghc = bh.compiler.ghc982;
582       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
583     };
584     ghc98 = packages.ghc982;
585     ghc9101 = callPackage ../development/haskell-modules {
586       buildHaskellPackages = bh.packages.ghc9101;
587       ghc = bh.compiler.ghc9101;
588       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.10.x.nix { };
589     };
590     ghc910 = packages.ghc9101;
591     ghcHEAD = callPackage ../development/haskell-modules {
592       buildHaskellPackages = bh.packages.ghcHEAD;
593       ghc = bh.compiler.ghcHEAD;
594       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.12.x.nix { };
595     };
597     ghcjs = packages.ghcjs810;
598     ghcjs810 = callPackage ../development/haskell-modules rec {
599       buildHaskellPackages = ghc.bootPkgs;
600       ghc = bh.compiler.ghcjs810;
601       compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
602       packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs-8.x.nix { };
603     };
605     # The integer-simple attribute set contains package sets for all the GHC compilers
606     # using integer-simple instead of integer-gmp.
607     integer-simple =
608       let
609         integerSimpleGhcNames = pkgs.lib.filter
610           (name: builtins.elem name integerSimpleIncludes)
611           (pkgs.lib.attrNames packages);
612       in
613       pkgs.lib.genAttrs integerSimpleGhcNames
614         (name:
615           packages.${name}.override (oldAttrs: {
616             ghc = bh.compiler.integer-simple.${name};
617             buildHaskellPackages = bh.packages.integer-simple.${name};
618             overrides =
619               pkgs.lib.composeExtensions
620                 (oldAttrs.overrides or (_: _: {}))
621                 (_: _: { integer-simple = null; });
622           })
623         );
625     native-bignum =
626       let
627         nativeBignumGhcNames = pkgs.lib.filter
628           (name: !(builtins.elem name nativeBignumExcludes))
629           (pkgs.lib.attrNames compiler);
630       in
631       pkgs.lib.genAttrs nativeBignumGhcNames
632         (name:
633           packages.${name}.override {
634             ghc = bh.compiler.native-bignum.${name};
635             buildHaskellPackages = bh.packages.native-bignum.${name};
636           }
637         );
638   };