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
385 # Members of the elmPackages set that are Haskell derivations
387 inherit (pkgsPlatforms.elmPackages)
395 # GHCs linked to musl.
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.
405 # musl only supports linux, not darwin.
410 haskell.compiler = lib.recursiveUpdate
411 (packagePlatforms pkgs.pkgsMusl.haskell.compiler)
413 # remove musl ghc865Binary since it is known to be broken and
414 # causes an evaluation error on darwin.
421 # Get some cache going for MUSL-enabled GHC.
424 inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
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)
438 "aarch64-linux" # times out on Hydra
440 # Static doesn't work on darwin
445 inherit (packagePlatforms pkgs.pkgsStatic.haskellPackages)
451 terminfo # isn't bundled for cross
452 xhtml # isn't bundled for cross
456 haskell.packages.native-bignum.ghc948 = {
457 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc948)
463 terminfo # isn't bundled for cross
464 xhtml # isn't bundled for cross
468 haskell.packages.native-bignum.ghc983 = {
469 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc983)
473 terminfo # isn't bundled for cross
482 # Hydra output size of 3GB is exceeded
487 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages)
494 haskell.packages.ghc98 = {
495 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghc98)
502 haskell.packages.ghcHEAD = {
503 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghcHEAD)
512 # Cross compilation of GHC
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.
519 # Latest GHC we are able to cross-compile.
525 aarch64-multiplatform = {
526 # Cross compilation of GHC
528 inherit (packagePlatforms pkgs.pkgsCross.aarch64-multiplatform.haskell.compiler)
529 # Uses a separate expression and LLVM backend for aarch64.
531 # Latest GHC we are able to cross-compile. Uses NCG backend.
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
560 compilerNames.ghc9101
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
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
596 nix-paths = released;
597 titlecase = lib.subtractLists [
598 compilerNames.ghc9101
601 compilerNames.ghc8107
605 compilerNames.ghc8107
607 ghc-lib = lib.subtractLists [
608 compilerNames.ghc9101
610 ghc-lib-parser = lib.subtractLists [
611 compilerNames.ghc9101
613 ghc-lib-parser-ex = lib.subtractLists [
614 compilerNames.ghc9101
617 # Feel free to remove these as they break,
618 compilerNames.ghc8107
622 ghc-tags = lib.subtractLists [
623 compilerNames.ghc9101
625 hashable = lib.subtractLists [
626 compilerNames.ghc9101
628 primitive = lib.subtractLists [
629 compilerNames.ghc9101
631 weeder = lib.subtractLists [
632 compilerNames.ghc9101
636 mergeable = pkgs.releaseTools.aggregate {
637 name = "haskell-updates-mergeable";
640 Critical haskell packages that should work at all times,
641 serves as minimum requirement for an update merge
643 maintainers = lib.teams.haskell.members;
646 accumulateDerivations [
647 # haskell specific tests
649 # important top-level packages
654 jobs.haskell-language-server
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
676 maintained = pkgs.releaseTools.aggregate {
677 name = "maintained-haskell-packages";
679 description = "Aggregate jobset of all haskell packages with a maintainer";
680 maintainers = lib.teams.haskell.members;
682 constituents = accumulateDerivations
684 (name: jobs.haskellPackages."${name}")
685 (maintainedPkgNames pkgs.haskellPackages));
688 muslGHCs = pkgs.releaseTools.aggregate {
689 name = "haskell-pkgsMusl-ghcs";
691 description = "GHCs built with musl";
692 maintainers = with lib.maintainers; [
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
715 staticHaskellPackages = pkgs.releaseTools.aggregate {
716 name = "static-haskell-packages";
718 description = "Static haskell builds using the pkgsStatic infrastructure";
720 lib.maintainers.sternenseemann
721 lib.maintainers.rnhmjoj
724 constituents = accumulateDerivations [
725 jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
726 jobs.pkgsStatic.haskellPackages
727 jobs.pkgsStatic.haskell.packages.native-bignum.ghc983