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; [
81 # packagePlatforms applied to `haskell.packages.*`
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
91 # lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]
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
107 # You can call versionedCompilerJobs like the following:
110 # versionedCompilerJobs {
111 # ghc-tags = ["ghc902" "ghc924"];
115 # This would produce an output like the following:
119 # haskell.packages = {
124 # aarch64-darwin = <derivation...>;
125 # aarch64-linux = <derivation...>;
130 # ghc-tags = { ... };
136 versionedCompilerJobs = config: mapTestOn {
139 # Mapping function that takes an attrset of jobs, and
140 # removes all jobs that are not specified in config.
142 # For example, imagine a call to onlyConfigJobs like:
149 # lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ];
153 # onlyConfigJobs pulls out only those jobs that are specified in config.
155 # For instance, if config is `{ lens = [ "ghc902" ]; }`, then the above
156 # example call to onlyConfigJobs will return:
159 # { lens = [ "i686-cygwin" "x86_64-cygwin" ... "x86_64-windows" "i686-windows" ]; }
162 # If config is `{ lens = [ "ghc8107" ]; }`, then the above example call
163 # to onlyConfigJobs returns `{}`.
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:
169 configFilteredJobset =
171 (jobName: platforms: lib.elem ghc (config."${jobName}" or []))
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 =
179 (_: platforms: lib.intersectLists jobs.ghc platforms)
180 configFilteredJobset;
182 jobsetWithGHCPlatforms;
184 lib.mapAttrs onlyConfigJobs compilerPlatforms;
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
193 _: v: builtins.length (v.meta.maintainers or []) > 0
196 recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {};
198 # Remove multiple elements from a list at once.
201 # :: [a] -- list of elements to remove
202 # -> [a] -- list of elements from which to remove
205 # > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]
207 removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove;
209 # Recursively remove platforms from the values in an attribute set.
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"];
221 # > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet
223 # foo = ["x86_64-linux"];
225 # baz = ["x86_64-linux"];
229 removePlatforms = platformsToRemove: packageSet:
230 lib.mapAttrsRecursive
233 then removeMany platformsToRemove val
238 jobs = recursiveUpdateMany [
240 haskellPackages = packagePlatforms pkgs.haskellPackages;
241 haskell.compiler = packagePlatforms pkgs.haskell.compiler // (lib.genAttrs [
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;
254 tests.haskell = packagePlatforms pkgs.tests.haskell;
257 inherit (packagePlatforms pkgs.nixosTests)
264 agdaPackages = packagePlatforms pkgs.agdaPackages;
266 # top-level packages that depend on haskellPackages
267 inherit (pkgsPlatforms)
276 # carp broken on 2024-04-09
305 haskell-language-server
306 hasura-graphql-engine
312 hledger-check-fancyassertions
350 # pakcs broken by set-extra on 2024-03-15
353 pinboard-notes-backup
378 # 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.
397 pkgsMusl.haskell.compiler = lib.recursiveUpdate
398 (packagePlatforms pkgs.pkgsMusl.haskell.compiler)
400 # remove musl ghc865Binary since it is known to be broken and
401 # causes an evaluation error on darwin.
408 # Get some cache going for MUSL-enabled GHC.
409 pkgsMusl.haskellPackages =
412 # pkgsMusl is compiled natively with musl. It is not
413 # cross-compiled (unlike pkgsStatic). We can only
414 # natively bootstrap GHC with musl on x86_64-linux because
415 # upstream doesn't provide a musl bindist for aarch64.
418 # musl only supports linux, not darwin.
423 inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
430 # Test some statically linked packages to catch regressions
431 # and get some cache going for static compilation with GHC.
432 # Use native-bignum to avoid GMP linking problems (LGPL)
436 "aarch64-linux" # times out on Hydra
438 # Static doesn't work on darwin
443 inherit (packagePlatforms pkgs.pkgsStatic.haskellPackages)
449 terminfo # isn't bundled for cross
450 xhtml # isn't bundled for cross
454 haskell.packages.native-bignum.ghc948 = {
455 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc948)
461 terminfo # isn't bundled for cross
462 xhtml # isn't bundled for cross
466 haskell.packages.native-bignum.ghc982 = {
467 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc982)
471 terminfo # isn't bundled for cross
479 # Hydra output size of 3GB is exceeded
484 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskellPackages)
491 haskell.packages.ghc98 = {
492 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghc98)
499 haskell.packages.ghcHEAD = {
500 inherit (packagePlatforms pkgs.pkgsCross.ghcjs.haskell.packages.ghcHEAD)
508 (versionedCompilerJobs {
509 # Packages which should be checked on more than the
510 # default GHC version. This list can be used to test
511 # the state of the package set with newer compilers
512 # and to confirm that critical packages for the
513 # package sets (like Cabal, jailbreak-cabal) are
514 # working as expected.
515 cabal-install = lib.subtractLists [
516 # It is recommended to use pkgs.cabal-install instead of cabal-install
517 # from the package sets. Due to (transitively) requiring recent versions
518 # of core packages, it is not always reasonable to get cabal-install to
519 # work with older compilers.
520 compilerNames.ghc8107
530 compilerNames.ghc9101
532 Cabal_3_10_3_0 = released;
533 Cabal-syntax_3_10_3_0 = released;
534 Cabal_3_12_1_0 = released;
535 Cabal-syntax_3_12_1_0 = released;
536 cabal2nix = lib.subtractLists [
537 compilerNames.ghc9101
539 cabal2nix-unstable = lib.subtractLists [
540 compilerNames.ghc9101
543 haskell-language-server = lib.subtractLists [
544 # Support ceased as of 2.3.0.0
545 compilerNames.ghc8107
546 # Support ceased as of 2.5.0.0
548 # No support yet (2024-05-12)
549 compilerNames.ghc9101
551 hoogle = lib.subtractLists [
552 compilerNames.ghc9101
554 hlint = lib.subtractLists [
556 compilerNames.ghc9101
558 hpack = lib.subtractLists [
559 compilerNames.ghc9101
562 jailbreak-cabal = released;
563 language-nix = lib.subtractLists [
564 compilerNames.ghc9101
569 nix-paths = released;
570 titlecase = lib.subtractLists [
571 compilerNames.ghc9101
574 compilerNames.ghc8107
578 compilerNames.ghc8107
580 ghc-lib = lib.subtractLists [
581 compilerNames.ghc9101
583 ghc-lib-parser = lib.subtractLists [
584 compilerNames.ghc9101
586 ghc-lib-parser-ex = lib.subtractLists [
587 compilerNames.ghc9101
590 # Feel free to remove these as they break,
591 compilerNames.ghc8107
595 ghc-tags = lib.subtractLists [
596 compilerNames.ghc9101
598 hashable = lib.subtractLists [
599 compilerNames.ghc9101
601 primitive = lib.subtractLists [
602 compilerNames.ghc9101
604 weeder = lib.subtractLists [
605 compilerNames.ghc9101
609 mergeable = pkgs.releaseTools.aggregate {
610 name = "haskell-updates-mergeable";
613 Critical haskell packages that should work at all times,
614 serves as minimum requirement for an update merge
616 maintainers = lib.teams.haskell.members;
619 accumulateDerivations [
620 # haskell specific tests
622 # important top-level packages
627 jobs.haskell-language-server
636 # important haskell (library) packages
637 jobs.haskellPackages.cabal-plan
638 jobs.haskellPackages.distribution-nixpkgs
639 jobs.haskellPackages.hackage-db
640 jobs.haskellPackages.xmonad
641 jobs.haskellPackages.xmonad-contrib
642 # haskell packages maintained by @peti
643 # imported from the old hydra jobset
644 jobs.haskellPackages.hopenssl
645 jobs.haskellPackages.hsemail
646 jobs.haskellPackages.hsyslog
649 maintained = pkgs.releaseTools.aggregate {
650 name = "maintained-haskell-packages";
652 description = "Aggregate jobset of all haskell packages with a maintainer";
653 maintainers = lib.teams.haskell.members;
655 constituents = accumulateDerivations
657 (name: jobs.haskellPackages."${name}")
658 (maintainedPkgNames pkgs.haskellPackages));
661 muslGHCs = pkgs.releaseTools.aggregate {
662 name = "haskell-pkgsMusl-ghcs";
664 description = "GHCs built with musl";
665 maintainers = with lib.maintainers; [
669 constituents = accumulateDerivations [
670 jobs.pkgsMusl.haskell.compiler.ghc8107Binary
671 jobs.pkgsMusl.haskell.compiler.ghc8107
672 jobs.pkgsMusl.haskell.compiler.ghc902
673 jobs.pkgsMusl.haskell.compiler.ghc925
674 jobs.pkgsMusl.haskell.compiler.ghc926
675 jobs.pkgsMusl.haskell.compiler.ghc927
676 jobs.pkgsMusl.haskell.compiler.ghc928
677 jobs.pkgsMusl.haskell.compiler.ghcHEAD
678 jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
679 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
680 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc925
681 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc926
682 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc927
683 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928
684 jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
688 staticHaskellPackages = pkgs.releaseTools.aggregate {
689 name = "static-haskell-packages";
691 description = "Static haskell builds using the pkgsStatic infrastructure";
693 lib.maintainers.sternenseemann
694 lib.maintainers.rnhmjoj
697 constituents = accumulateDerivations [
698 jobs.pkgsStatic.haskell.packages.native-bignum.ghc948 # non-hadrian
699 jobs.pkgsStatic.haskellPackages
700 jobs.pkgsStatic.haskell.packages.native-bignum.ghc982