{ungoogled-,}chromium,chromedriver: 130.0.6723.58 -> 130.0.6723.69 (#351519)
[NixPkgs.git] / pkgs / top-level / release-haskell.nix
blob9aa16176c3ced1b914913b1824c5cf992d854c0f
1 /*
2   This is the Hydra jobset for the `haskell-updates` branch in Nixpkgs.
3   You can see the status of this jobset at
4   https://hydra.nixos.org/jobset/nixpkgs/haskell-updates.
6   To debug this expression you can use `hydra-eval-jobs` from
7   `pkgs.hydra` which prints the jobset description
8   to `stdout`:
10   $ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix
12 { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] }:
14 let
16   releaseLib = import ./release-lib.nix {
17     inherit supportedSystems;
18   };
20   inherit (releaseLib)
21     lib
22     mapTestOn
23     packagePlatforms
24     pkgs
25     ;
27   # Helper function which traverses a (nested) set
28   # of derivations produced by mapTestOn and flattens
29   # it to a list of derivations suitable to be passed
30   # to `releaseTools.aggregate` as constituents.
31   # Removes all non derivations from the input jobList.
32   #
33   # accumulateDerivations :: [ Either Derivation AttrSet ] -> [ Derivation ]
34   #
35   # > accumulateDerivations [ drv1 "string" { foo = drv2; bar = { baz = drv3; }; } ]
36   # [ drv1 drv2 drv3 ]
37   accumulateDerivations = jobList:
38     lib.concatMap (
39       attrs:
40         if lib.isDerivation attrs
41         then [ attrs ]
42         else lib.optionals (lib.isAttrs attrs) (accumulateDerivations (lib.attrValues attrs))
43     ) jobList;
45   # names of all subsets of `pkgs.haskell.packages`
46   #
47   # compilerNames looks like the following:
48   #
49   # ```
50   # {
51   #   ghc810 = "ghc810";
52   #   ghc8107Binary = "ghc8107Binary";
53   #   ghc8107 = "ghc8107";
54   #   ghc924 = "ghc924";
55   #   ...
56   # }
57   # ```
58   compilerNames = lib.mapAttrs (name: _: name) pkgs.haskell.packages;
60   # list of all compilers to test specific packages on
61   released = with compilerNames; [
62     ghc8107
63     ghc902
64     ghc925
65     ghc926
66     ghc927
67     ghc928
68     ghc945
69     ghc946
70     ghc947
71     ghc948
72     ghc963
73     ghc964
74     ghc965
75     ghc966
76     ghc981
77     ghc982
78     ghc9101
79   ];
81   # packagePlatforms applied to `haskell.packages.*`
82   #
83   # This returns an attr set that looks like the following, where each Haskell
84   # package in the compiler attr set has its list of supported platforms as its
85   # value.
86   #
87   # ```
88   # {
89   #   ghc810 = {
90   #     conduit = [ ... ];
91   #     lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]
92   #     ...
93   #   };
94   #   ghc902 = { ... };
95   #   ...
96   # }
97   # ```
98   compilerPlatforms = lib.mapAttrs
99     (_: v: packagePlatforms v)
100     pkgs.haskell.packages;
102   # This function lets you specify specific packages
103   # which are to be tested on a list of specific GHC
104   # versions and returns a job set for all specified
105   # combinations.
106   #
107   # You can call versionedCompilerJobs like the following:
108   #
109   # ```
110   # versionedCompilerJobs {
111   #   ghc-tags = ["ghc902" "ghc924"];
112   # }
113   # ```
114   #
115   # This would produce an output like the following:
116   #
117   # ```
118   # {
119   #   haskell.packages = {
120   #     ghc884 = {};
121   #     ghc810 = {};
122   #     ghc902 = {
123   #       ghc-tags = {
124   #         aarch64-darwin = <derivation...>;
125   #         aarch64-linux = <derivation...>;
126   #         ...
127   #       };
128   #     };
129   #     ghc924 = {
130   #       ghc-tags = { ... };
131   #     };
132   #     ...
133   #   };
134   # }
135   # ```
136   versionedCompilerJobs = config: mapTestOn {
137     haskell.packages =
138       let
139         # Mapping function that takes an attrset of jobs, and
140         # removes all jobs that are not specified in config.
141         #
142         # For example, imagine a call to onlyConfigJobs like:
143         #
144         # ```
145         # onlyConfigJobs
146         #   "ghc902"
147         #   {
148         #     conduit = [ ... ];
149         #     lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ];
150         #   }
151         # ```
152         #
153         # onlyConfigJobs pulls out only those jobs that are specified in config.
154         #
155         # For instance, if config is `{ lens = [ "ghc902" ]; }`, then the above
156         # example call to onlyConfigJobs will return:
157         #
158         # ```
159         # { lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]; }
160         # ```
161         #
162         # If config is `{ lens = [ "ghc8107" ]; }`, then the above example call
163         # to onlyConfigJobs returns `{}`.
164         #
165         # onlyConfigJobs will also remove all platforms from a job that are not
166         # supported by the GHC it is compiled with.
167         onlyConfigJobs = ghc: jobs:
168           let
169             configFilteredJobset =
170               lib.filterAttrs
171                 (jobName: platforms: lib.elem ghc (config."${jobName}" or []))
172                 jobs;
174             # Remove platforms from each job that are not supported by GHC.
175             # This is important so that we don't build jobs for platforms
176             # where GHC can't be compiled.
177             jobsetWithGHCPlatforms =
178               lib.mapAttrs
179                 (_: platforms: lib.intersectLists jobs.ghc platforms)
180                 configFilteredJobset;
181           in
182           jobsetWithGHCPlatforms;
183       in
184       lib.mapAttrs onlyConfigJobs compilerPlatforms;
185   };
187   # hydra jobs for `pkgs` of which we import a subset of
188   pkgsPlatforms = packagePlatforms pkgs;
190   # names of packages in an attribute set that are maintained
191   maintainedPkgNames = set: builtins.attrNames
192     (lib.filterAttrs (
193       _: v: builtins.length (v.meta.maintainers or []) > 0
194     ) set);
196   recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {};
198   # Remove multiple elements from a list at once.
199   #
200   # removeMany
201   #   :: [a]  -- list of elements to remove
202   #   -> [a]  -- list of elements from which to remove
203   #   -> [a]
204   #
205   # > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]
206   # ["x86_64-linux"]
207   removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove;
209   # Recursively remove platforms from the values in an attribute set.
210   #
211   # removePlatforms
212   #   :: [String]
213   #   -> AttrSet
214   #   -> AttrSet
215   #
216   # > attrSet = {
217   #     foo = ["aarch64-linux" "x86_64-darwin" "x86_64-linux"];
218   #     bar.baz = ["aarch64-linux" "x86_64-linux"];
219   #     bar.quux = ["aarch64-linux" "x86_64-darwin"];
220   #   }
221   # > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet
222   # {
223   #   foo = ["x86_64-linux"];
224   #   bar = {
225   #     baz = ["x86_64-linux"];
226   #     quux = [];
227   #   };
228   # }
229   removePlatforms = platformsToRemove: packageSet:
230     lib.mapAttrsRecursive
231       (_: val:
232         if lib.isList val
233           then removeMany platformsToRemove val
234           else val
235       )
236       packageSet;
238   jobs = recursiveUpdateMany [
239     (mapTestOn {
240       haskellPackages = packagePlatforms pkgs.haskellPackages;
241       haskell.compiler = packagePlatforms pkgs.haskell.compiler // (lib.genAttrs [
242         "ghcjs"
243         "ghcjs810"
244       ] (ghcjsName: {
245         # We can't build ghcjs itself, since it exceeds 3GB (Hydra's output limit) due
246         # to the size of its bundled libs. We can however save users a bit of compile
247         # time by building the bootstrap ghcjs on Hydra. For this reason, we overwrite
248         # the ghcjs attributes in haskell.compiler with a reference to the bootstrap
249         # ghcjs attribute in their bootstrap package set (exposed via passthru) which
250         # would otherwise be ignored by Hydra.
251         bootGhcjs = (packagePlatforms pkgs.haskell.compiler.${ghcjsName}.passthru).bootGhcjs;
252       }));
254       tests.haskell = packagePlatforms pkgs.tests.haskell;
256       nixosTests = {
257         inherit (packagePlatforms pkgs.nixosTests)
258           agda
259           xmonad
260           xmonad-xdg-autostart
261         ;
262       };
264       agdaPackages = packagePlatforms pkgs.agdaPackages;
266       # top-level packages that depend on haskellPackages
267       inherit (pkgsPlatforms)
268         agda
269         alex
270         arion
271         bench
272         blucontrol
273         cabal-install
274         cabal2nix
275         cachix
276         # carp broken on 2024-04-09
277         changelog-d
278         cornelis
279         cedille
280         client-ip-echo
281         darcs
282         dconf2nix
283         dhall
284         dhall-bash
285         dhall-docs
286         dhall-lsp-server
287         dhall-json
288         dhall-nix
289         dhall-nixpkgs
290         dhall-yaml
291         diagrams-builder
292         echidna
293         elm2nix
294         emanote
295         fffuu
296         futhark
297         ghcid
298         git-annex
299         git-brunch
300         gitit
301         glirc
302         hadolint
303         happy
304         haskell-ci
305         haskell-language-server
306         hasura-graphql-engine
307         hci
308         hercules-ci-agent
309         hinit
310         hedgewars
311         hledger
312         hledger-check-fancyassertions
313         hledger-iadd
314         hledger-interest
315         hledger-ui
316         hledger-web
317         hlint
318         hpack
319         hscolour
320         icepeak
321         ihaskell
322         jacinda
323         jl
324         json2yaml
325         koka
326         krank
327         lambdabot
328         lhs2tex
329         madlang
330         matterhorn
331         mkjson
332         mueval
333         naproche
334         niv
335         nix-delegate
336         nix-deploy
337         nix-diff
338         nix-linter
339         nix-output-monitor
340         nix-script
341         nix-tree
342         nixfmt
343         nixfmt-classic
344         nixfmt-rfc-style
345         nota
346         nvfetcher
347         oama
348         ormolu
349         pakcs
350         pandoc
351         place-cursor-at
352         pinboard-notes-backup
353         pretty-simple
354         purenix
355         shake
356         shellcheck
357         shellcheck-minimal
358         sourceAndTags
359         spacecookie
360         spago
361         specup
362         splot
363         stack
364         stack2nix
365         stutter
366         stylish-haskell
367         taffybar
368         tamarin-prover
369         taskell
370         termonad
371         tldr-hs
372         tweet-hs
373         update-nix-fetchgit
374         uusi
375         uqm
376         uuagc
377         # vaultenv: broken by connection on 2024-03-16
378         wstunnel
379         xmobar
380         xmonadctl
381         xmonad-with-packages
382         zsh-git-prompt
383         ;
385       # Members of the elmPackages set that are Haskell derivations
386       elmPackages = {
387         inherit (pkgsPlatforms.elmPackages)
388           elm
389           elm-format
390           elm-instrument
391           elmi-to-json
392           ;
393       };
395       # GHCs linked to musl.
396       pkgsMusl =
397         removePlatforms
398           [
399             # pkgsMusl is compiled natively with musl.  It is not
400             # cross-compiled (unlike pkgsStatic).  We can only
401             # natively bootstrap GHC with musl on x86_64-linux because
402             # upstream doesn't provide a musl bindist for aarch64.
403             "aarch64-linux"
405             # musl only supports linux, not darwin.
406             "x86_64-darwin"
407             "aarch64-darwin"
408           ]
409           {
410             haskell.compiler = lib.recursiveUpdate
411               (packagePlatforms pkgs.pkgsMusl.haskell.compiler)
412               {
413                 # remove musl ghc865Binary since it is known to be broken and
414                 # causes an evaluation error on darwin.
415                 ghc865Binary = {};
417                 ghcjs = {};
418                 ghcjs810 = {};
419               };
421             # Get some cache going for MUSL-enabled GHC.
422             haskellPackages =
423               {
424                 inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
425                   hello
426                   lens
427                   random
428                 ;
429               };
430           };
432       # Test some statically linked packages to catch regressions
433       # and get some cache going for static compilation with GHC.
434       # Use native-bignum to avoid GMP linking problems (LGPL)
435       pkgsStatic =
436         removePlatforms
437           [
438             "aarch64-linux" # times out on Hydra
440             # Static doesn't work on darwin
441             "x86_64-darwin"
442             "aarch64-darwin"
443           ] {
444             haskellPackages = {
445               inherit (packagePlatforms pkgs.pkgsStatic.haskellPackages)
446                 hello
447                 lens
448                 random
449                 QuickCheck
450                 cabal2nix
451                 terminfo # isn't bundled for cross
452                 xhtml # isn't bundled for cross
453               ;
454             };
456             haskell.packages.native-bignum.ghc948 = {
457               inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc948)
458                 hello
459                 lens
460                 random
461                 QuickCheck
462                 cabal2nix
463                 terminfo # isn't bundled for cross
464                 xhtml # isn't bundled for cross
465               ;
466             };
468             haskell.packages.native-bignum.ghc982 = {
469               inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc982)
470                 hello
471                 random
472                 QuickCheck
473                 terminfo # isn't bundled for cross
474                 ;
475             };
476           };
478       pkgsCross = {
479         ghcjs =
480           removePlatforms
481             [
482               # Hydra output size of 3GB is exceeded
483               "aarch64-linux"
484             ]
485             {
486               haskellPackages = {
487                 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages)
488                   ghc
489                   hello
490                   microlens
491                 ;
492               };
494               haskell.packages.ghc98 = {
495                 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghc98)
496                   ghc
497                   hello
498                   microlens
499                 ;
500               };
502               haskell.packages.ghcHEAD = {
503                 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghcHEAD)
504                   ghc
505                   hello
506                   microlens
507                 ;
508               };
509             };
511         riscv64 = {
512           # Cross compilation of GHC
513           haskell.compiler = {
514             inherit (packagePlatforms pkgs.pkgsCross.riscv64.haskell.compiler)
515               # Our oldest GHC which still uses its own expression. 8.10.7 can
516               # theoretically be used to chain bootstrap all GHCs on riscv64
517               # which doesn't have official bindists.
518               ghc8107
519               # Latest GHC we are able to cross-compile.
520               ghc948
521               ;
522           };
523         };
525         aarch64-multiplatform = {
526           # Cross compilation of GHC
527           haskell.compiler = {
528             inherit (packagePlatforms pkgs.pkgsCross.aarch64-multiplatform.haskell.compiler)
529               # Uses a separate expression and LLVM backend for aarch64.
530               ghc8107
531               # Latest GHC we are able to cross-compile. Uses NCG backend.
532               ghc948
533               ;
534           };
535         };
536       };
537     })
538     (versionedCompilerJobs {
539       # Packages which should be checked on more than the
540       # default GHC version. This list can be used to test
541       # the state of the package set with newer compilers
542       # and to confirm that critical packages for the
543       # package sets (like Cabal, jailbreak-cabal) are
544       # working as expected.
545       cabal-install = lib.subtractLists [
546         # It is recommended to use pkgs.cabal-install instead of cabal-install
547         # from the package sets. Due to (transitively) requiring recent versions
548         # of core packages, it is not always reasonable to get cabal-install to
549         # work with older compilers.
550         compilerNames.ghc8107
551         compilerNames.ghc902
552         compilerNames.ghc925
553         compilerNames.ghc926
554         compilerNames.ghc927
555         compilerNames.ghc928
556         compilerNames.ghc945
557         compilerNames.ghc946
558         compilerNames.ghc947
559         compilerNames.ghc948
560         compilerNames.ghc9101
561       ] released;
562       Cabal_3_10_3_0 = released;
563       Cabal-syntax_3_10_3_0 = released;
564       Cabal_3_12_1_0 = released;
565       Cabal-syntax_3_12_1_0 = released;
566       cabal2nix = lib.subtractLists [
567         compilerNames.ghc9101
568       ] released;
569       cabal2nix-unstable = lib.subtractLists [
570         compilerNames.ghc9101
571       ] released;
572       funcmp = released;
573       haskell-language-server = lib.subtractLists [
574         # Support ceased as of 2.3.0.0
575         compilerNames.ghc8107
576         # Support ceased as of 2.5.0.0
577         compilerNames.ghc902
578       ] released;
579       hoogle = lib.subtractLists [
580       ] released;
581       hlint = lib.subtractLists [
582         compilerNames.ghc902
583         compilerNames.ghc9101
584       ] released;
585       hpack = lib.subtractLists [
586         compilerNames.ghc9101
587       ] released;
588       hsdns = released;
589       jailbreak-cabal = released;
590       language-nix = lib.subtractLists [
591         compilerNames.ghc9101
592       ] released;
593       large-hashable = [
594         compilerNames.ghc928
595       ];
596       nix-paths = released;
597       titlecase = lib.subtractLists [
598         compilerNames.ghc9101
599       ] released;
600       ghc-api-compat = [
601         compilerNames.ghc8107
602         compilerNames.ghc902
603       ];
604       ghc-bignum = [
605         compilerNames.ghc8107
606       ];
607       ghc-lib = lib.subtractLists [
608         compilerNames.ghc9101
609       ] released;
610       ghc-lib-parser = lib.subtractLists [
611         compilerNames.ghc9101
612       ] released;
613       ghc-lib-parser-ex = lib.subtractLists [
614         compilerNames.ghc9101
615       ] released;
616       ghc-source-gen = [
617         # Feel free to remove these as they break,
618         compilerNames.ghc8107
619         compilerNames.ghc902
620         compilerNames.ghc928
621       ];
622       ghc-tags = lib.subtractLists [
623         compilerNames.ghc9101
624       ] released;
625       hashable = lib.subtractLists [
626         compilerNames.ghc9101
627       ] released;
628       primitive = lib.subtractLists [
629         compilerNames.ghc9101
630       ] released;
631       weeder = lib.subtractLists [
632         compilerNames.ghc9101
633       ] released;
634     })
635     {
636       mergeable = pkgs.releaseTools.aggregate {
637         name = "haskell-updates-mergeable";
638         meta = {
639           description = ''
640             Critical haskell packages that should work at all times,
641             serves as minimum requirement for an update merge
642           '';
643           maintainers = lib.teams.haskell.members;
644         };
645         constituents =
646           accumulateDerivations [
647             # haskell specific tests
648             jobs.tests.haskell
649             # important top-level packages
650             jobs.cabal-install
651             jobs.cabal2nix
652             jobs.cachix
653             jobs.darcs
654             jobs.haskell-language-server
655             jobs.hledger
656             jobs.hledger-ui
657             jobs.hpack
658             jobs.niv
659             jobs.pandoc
660             jobs.stack
661             jobs.stylish-haskell
662             jobs.shellcheck
663             # important haskell (library) packages
664             jobs.haskellPackages.cabal-plan
665             jobs.haskellPackages.distribution-nixpkgs
666             jobs.haskellPackages.hackage-db
667             jobs.haskellPackages.xmonad
668             jobs.haskellPackages.xmonad-contrib
669             # haskell packages maintained by @peti
670             # imported from the old hydra jobset
671             jobs.haskellPackages.hopenssl
672             jobs.haskellPackages.hsemail
673             jobs.haskellPackages.hsyslog
674            ];
675       };
676       maintained = pkgs.releaseTools.aggregate {
677         name = "maintained-haskell-packages";
678         meta = {
679           description = "Aggregate jobset of all haskell packages with a maintainer";
680           maintainers = lib.teams.haskell.members;
681         };
682         constituents = accumulateDerivations
683           (builtins.map
684             (name: jobs.haskellPackages."${name}")
685             (maintainedPkgNames pkgs.haskellPackages));
686       };
688       muslGHCs = pkgs.releaseTools.aggregate {
689         name = "haskell-pkgsMusl-ghcs";
690         meta = {
691           description = "GHCs built with musl";
692           maintainers = with lib.maintainers; [
693             nh2
694           ];
695         };
696         constituents = accumulateDerivations [
697           jobs.pkgsMusl.haskell.compiler.ghc8107Binary
698           jobs.pkgsMusl.haskell.compiler.ghc8107
699           jobs.pkgsMusl.haskell.compiler.ghc902
700           jobs.pkgsMusl.haskell.compiler.ghc925
701           jobs.pkgsMusl.haskell.compiler.ghc926
702           jobs.pkgsMusl.haskell.compiler.ghc927
703           jobs.pkgsMusl.haskell.compiler.ghc928
704           jobs.pkgsMusl.haskell.compiler.ghcHEAD
705           jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
706           jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
707           jobs.pkgsMusl.haskell.compiler.native-bignum.ghc925
708           jobs.pkgsMusl.haskell.compiler.native-bignum.ghc926
709           jobs.pkgsMusl.haskell.compiler.native-bignum.ghc927
710           jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928
711           jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
712         ];
713       };
715       staticHaskellPackages = pkgs.releaseTools.aggregate {
716         name = "static-haskell-packages";
717         meta = {
718           description = "Static haskell builds using the pkgsStatic infrastructure";
719           maintainers = [
720             lib.maintainers.sternenseemann
721             lib.maintainers.rnhmjoj
722           ];
723         };
724         constituents = accumulateDerivations [
725           jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
726           jobs.pkgsStatic.haskellPackages
727           jobs.pkgsStatic.haskell.packages.native-bignum.ghc982
728         ];
729       };
730     }
731   ];
733 in jobs