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
10 $ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix
12 { supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ] }:
16 releaseLib = import ./release-lib.nix {
17 inherit supportedSystems;
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.
33 # accumulateDerivations :: [ Either Derivation AttrSet ] -> [ Derivation ]
35 # > accumulateDerivations [ drv1 "string" { foo = drv2; bar = { baz = drv3; }; } ]
37 accumulateDerivations = jobList:
40 if lib.isDerivation attrs
42 else lib.optionals (lib.isAttrs attrs) (accumulateDerivations (lib.attrValues attrs))
45 # names of all subsets of `pkgs.haskell.packages`
47 # compilerNames looks like the following:
52 # ghc8107Binary = "ghc8107Binary";
53 # ghc8107 = "ghc8107";
58 compilerNames = lib.mapAttrs (name: _: name) pkgs.haskell.packages;
60 # list of all compilers to test specific packages on
61 released = with compilerNames; [
82 # packagePlatforms applied to `haskell.packages.*`
84 # This returns an attr set that looks like the following, where each Haskell
85 # package in the compiler attr set has its list of supported platforms as its
92 # lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]
99 compilerPlatforms = lib.mapAttrs
100 (_: v: packagePlatforms v)
101 pkgs.haskell.packages;
103 # This function lets you specify specific packages
104 # which are to be tested on a list of specific GHC
105 # versions and returns a job set for all specified
108 # You can call versionedCompilerJobs like the following:
111 # versionedCompilerJobs {
112 # ghc-tags = ["ghc902" "ghc924"];
116 # This would produce an output like the following:
120 # haskell.packages = {
125 # aarch64-darwin = <derivation...>;
126 # aarch64-linux = <derivation...>;
131 # ghc-tags = { ... };
137 versionedCompilerJobs = config: mapTestOn {
140 # Mapping function that takes an attrset of jobs, and
141 # removes all jobs that are not specified in config.
143 # For example, imagine a call to onlyConfigJobs like:
150 # lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ];
154 # onlyConfigJobs pulls out only those jobs that are specified in config.
156 # For instance, if config is `{ lens = [ "ghc902" ]; }`, then the above
157 # example call to onlyConfigJobs will return:
160 # { lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]; }
163 # If config is `{ lens = [ "ghc8107" ]; }`, then the above example call
164 # to onlyConfigJobs returns `{}`.
166 # onlyConfigJobs will also remove all platforms from a job that are not
167 # supported by the GHC it is compiled with.
168 onlyConfigJobs = ghc: jobs:
170 configFilteredJobset =
172 (jobName: platforms: lib.elem ghc (config."${jobName}" or []))
175 # Remove platforms from each job that are not supported by GHC.
176 # This is important so that we don't build jobs for platforms
177 # where GHC can't be compiled.
178 jobsetWithGHCPlatforms =
180 (_: platforms: lib.intersectLists jobs.ghc platforms)
181 configFilteredJobset;
183 jobsetWithGHCPlatforms;
185 lib.mapAttrs onlyConfigJobs compilerPlatforms;
188 # hydra jobs for `pkgs` of which we import a subset of
189 pkgsPlatforms = packagePlatforms pkgs;
191 # names of packages in an attribute set that are maintained
192 maintainedPkgNames = set: builtins.attrNames
194 _: v: builtins.length (v.meta.maintainers or []) > 0
197 recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {};
199 # Remove multiple elements from a list at once.
202 # :: [a] -- list of elements to remove
203 # -> [a] -- list of elements from which to remove
206 # > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]
208 removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove;
210 # Recursively remove platforms from the values in an attribute set.
218 # foo = ["aarch64-linux" "x86_64-darwin" "x86_64-linux"];
219 # bar.baz = ["aarch64-linux" "x86_64-linux"];
220 # bar.quux = ["aarch64-linux" "x86_64-darwin"];
222 # > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet
224 # foo = ["x86_64-linux"];
226 # baz = ["x86_64-linux"];
230 removePlatforms = platformsToRemove: packageSet:
231 lib.mapAttrsRecursive
234 then removeMany platformsToRemove val
239 jobs = recursiveUpdateMany [
241 haskellPackages = packagePlatforms pkgs.haskellPackages;
242 haskell.compiler = packagePlatforms pkgs.haskell.compiler // (lib.genAttrs [
246 # We can't build ghcjs itself, since it exceeds 3GB (Hydra's output limit) due
247 # to the size of its bundled libs. We can however save users a bit of compile
248 # time by building the bootstrap ghcjs on Hydra. For this reason, we overwrite
249 # the ghcjs attributes in haskell.compiler with a reference to the bootstrap
250 # ghcjs attribute in their bootstrap package set (exposed via passthru) which
251 # would otherwise be ignored by Hydra.
252 bootGhcjs = (packagePlatforms pkgs.haskell.compiler.${ghcjsName}.passthru).bootGhcjs;
255 tests.haskell = packagePlatforms pkgs.tests.haskell;
258 inherit (packagePlatforms pkgs.nixosTests)
265 agdaPackages = packagePlatforms pkgs.agdaPackages;
267 # top-level packages that depend on haskellPackages
268 inherit (pkgsPlatforms)
277 # carp broken on 2024-04-09
306 haskell-language-server
307 hasura-graphql-engine
313 hledger-check-fancyassertions
353 pinboard-notes-backup
377 # vaultenv: broken by connection on 2024-03-16
386 # Members of the elmPackages set that are Haskell derivations
388 inherit (pkgsPlatforms.elmPackages)
396 # GHCs linked to musl.
400 # pkgsMusl is compiled natively with musl. It is not
401 # cross-compiled (unlike pkgsStatic). We can only
402 # natively bootstrap GHC with musl on x86_64-linux because
403 # upstream doesn't provide a musl bindist for aarch64.
406 # musl only supports linux, not darwin.
411 haskell.compiler = lib.recursiveUpdate
412 (packagePlatforms pkgs.pkgsMusl.haskell.compiler)
414 # remove musl ghc865Binary since it is known to be broken and
415 # causes an evaluation error on darwin.
422 # Get some cache going for MUSL-enabled GHC.
425 inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
433 # Test some statically linked packages to catch regressions
434 # and get some cache going for static compilation with GHC.
435 # Use native-bignum to avoid GMP linking problems (LGPL)
439 "aarch64-linux" # times out on Hydra
441 # Static doesn't work on darwin
446 inherit (packagePlatforms pkgs.pkgsStatic.haskellPackages)
452 terminfo # isn't bundled for cross
453 xhtml # isn't bundled for cross
457 haskell.packages.native-bignum.ghc948 = {
458 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc948)
464 terminfo # isn't bundled for cross
465 xhtml # isn't bundled for cross
469 haskell.packages.native-bignum.ghc983 = {
470 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc983)
474 terminfo # isn't bundled for cross
483 # Hydra output size of 3GB is exceeded
488 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages)
495 haskell.packages.ghc98 = {
496 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghc98)
503 haskell.packages.ghcHEAD = {
504 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghcHEAD)
513 # Cross compilation of GHC
515 inherit (packagePlatforms pkgs.pkgsCross.riscv64.haskell.compiler)
516 # Our oldest GHC which still uses its own expression. 8.10.7 can
517 # theoretically be used to chain bootstrap all GHCs on riscv64
518 # which doesn't have official bindists.
520 # Latest GHC we are able to cross-compile.
526 aarch64-multiplatform = {
527 # Cross compilation of GHC
529 inherit (packagePlatforms pkgs.pkgsCross.aarch64-multiplatform.haskell.compiler)
530 # Uses a separate expression and LLVM backend for aarch64.
532 # Latest GHC we are able to cross-compile. Uses NCG backend.
539 (versionedCompilerJobs {
540 # Packages which should be checked on more than the
541 # default GHC version. This list can be used to test
542 # the state of the package set with newer compilers
543 # and to confirm that critical packages for the
544 # package sets (like Cabal, jailbreak-cabal) are
545 # working as expected.
546 cabal-install = lib.subtractLists [
547 # It is recommended to use pkgs.cabal-install instead of cabal-install
548 # from the package sets. Due to (transitively) requiring recent versions
549 # of core packages, it is not always reasonable to get cabal-install to
550 # work with older compilers.
551 compilerNames.ghc8107
561 compilerNames.ghc9101
563 Cabal_3_10_3_0 = released;
564 Cabal_3_12_1_0 = released;
565 Cabal_3_14_0_0 = released;
566 cabal2nix = lib.subtractLists [
567 compilerNames.ghc9101
569 cabal2nix-unstable = lib.subtractLists [
570 compilerNames.ghc9101
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
579 hoogle = lib.subtractLists [
581 hlint = lib.subtractLists [
583 compilerNames.ghc9101
585 hpack = lib.subtractLists [
586 compilerNames.ghc9101
589 jailbreak-cabal = released;
590 language-nix = lib.subtractLists [
591 compilerNames.ghc9101
593 nix-paths = released;
594 titlecase = lib.subtractLists [
595 compilerNames.ghc9101
598 compilerNames.ghc8107
602 compilerNames.ghc8107
604 ghc-lib = lib.subtractLists [
605 compilerNames.ghc9101
607 ghc-lib-parser = lib.subtractLists [
608 compilerNames.ghc9101
610 ghc-lib-parser-ex = lib.subtractLists [
611 compilerNames.ghc9101
614 # Feel free to remove these as they break,
615 compilerNames.ghc8107
619 ghc-tags = lib.subtractLists [
620 compilerNames.ghc9101
622 hashable = lib.subtractLists [
623 compilerNames.ghc9101
625 primitive = lib.subtractLists [
626 compilerNames.ghc9101
628 weeder = lib.subtractLists [
629 compilerNames.ghc9101
633 mergeable = pkgs.releaseTools.aggregate {
634 name = "haskell-updates-mergeable";
637 Critical haskell packages that should work at all times,
638 serves as minimum requirement for an update merge
640 maintainers = lib.teams.haskell.members;
643 accumulateDerivations [
644 # haskell specific tests
646 # important top-level packages
651 jobs.haskell-language-server
660 # important haskell (library) packages
661 jobs.haskellPackages.cabal-plan
662 jobs.haskellPackages.distribution-nixpkgs
663 jobs.haskellPackages.hackage-db
664 jobs.haskellPackages.xmonad
665 jobs.haskellPackages.xmonad-contrib
666 # haskell packages maintained by @peti
667 # imported from the old hydra jobset
668 jobs.haskellPackages.hopenssl
669 jobs.haskellPackages.hsemail
670 jobs.haskellPackages.hsyslog
673 maintained = pkgs.releaseTools.aggregate {
674 name = "maintained-haskell-packages";
676 description = "Aggregate jobset of all haskell packages with a maintainer";
677 maintainers = lib.teams.haskell.members;
679 constituents = accumulateDerivations
681 (name: jobs.haskellPackages."${name}")
682 (maintainedPkgNames pkgs.haskellPackages));
685 muslGHCs = pkgs.releaseTools.aggregate {
686 name = "haskell-pkgsMusl-ghcs";
688 description = "GHCs built with musl";
689 maintainers = with lib.maintainers; [
693 constituents = accumulateDerivations [
694 jobs.pkgsMusl.haskell.compiler.ghc8107Binary
695 jobs.pkgsMusl.haskell.compiler.ghc8107
696 jobs.pkgsMusl.haskell.compiler.ghc902
697 jobs.pkgsMusl.haskell.compiler.ghc925
698 jobs.pkgsMusl.haskell.compiler.ghc926
699 jobs.pkgsMusl.haskell.compiler.ghc927
700 jobs.pkgsMusl.haskell.compiler.ghc928
701 jobs.pkgsMusl.haskell.compiler.ghcHEAD
702 jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
703 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
704 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc925
705 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc926
706 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc927
707 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928
708 jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
712 staticHaskellPackages = pkgs.releaseTools.aggregate {
713 name = "static-haskell-packages";
715 description = "Static haskell builds using the pkgsStatic infrastructure";
717 lib.maintainers.sternenseemann
718 lib.maintainers.rnhmjoj
721 constituents = accumulateDerivations [
722 jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
723 jobs.pkgsStatic.haskellPackages
724 jobs.pkgsStatic.haskell.packages.native-bignum.ghc983