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_unstable` 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" ] }:
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 if lib.isAttrs attrs
43 then accumulateDerivations (lib.attrValues attrs)
47 # names of all subsets of `pkgs.haskell.packages`
48 compilerNames = lib.mapAttrs (name: _: name) pkgs.haskell.packages;
50 # list of all compilers to test specific packages on
51 released = with compilerNames; [
59 # packagePlatforms applied to `haskell.packages.*`
60 compilerPlatforms = lib.mapAttrs
61 (_: v: packagePlatforms v)
62 pkgs.haskell.packages;
64 # This function lets you specify specific packages
65 # which are to be tested on a list of specific GHC
66 # versions and returns a job set for all specified
67 # combinations. See `jobs` below for an example.
68 versionedCompilerJobs = config: mapTestOn {
74 lib.elem ghc (config."${jobName}" or [])
79 # hydra jobs for `pkgs` of which we import a subset of
80 pkgsPlatforms = packagePlatforms pkgs;
82 # names of packages in an attribute set that are maintained
83 maintainedPkgNames = set: builtins.attrNames
85 _: v: builtins.length (v.meta.maintainers or []) > 0
88 recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {};
90 # Remove multiple elements from a list at once.
93 # :: [a] -- list of elements to remove
94 # -> [a] -- list of elements from which to remove
97 # > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]
99 removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove;
101 # Recursively remove platforms from the values in an attribute set.
109 # foo = ["aarch64-linux" "x86_64-darwin" "x86_64-linux"];
110 # bar.baz = ["aarch64-linux" "x86_64-linux"];
111 # bar.quux = ["aarch64-linux" "x86_64-darwin"];
113 # > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet
115 # foo = ["x86_64-linux"];
117 # baz = ["x86_64-linux"];
121 removePlatforms = platformsToRemove: packageSet:
122 lib.mapAttrsRecursive
125 then removeMany platformsToRemove val
130 jobs = recursiveUpdateMany [
132 haskellPackages = packagePlatforms pkgs.haskellPackages;
133 haskell.compiler = packagePlatforms pkgs.haskell.compiler // (lib.genAttrs [
137 # We can't build ghcjs itself, since it exceeds 3GB (Hydra's output limit) due
138 # to the size of its bundled libs. We can however save users a bit of compile
139 # time by building the bootstrap ghcjs on Hydra. For this reason, we overwrite
140 # the ghcjs attributes in haskell.compiler with a reference to the bootstrap
141 # ghcjs attribute in their bootstrap package set (exposed via passthru) which
142 # would otherwise be ignored by Hydra.
143 bootGhcjs = (packagePlatforms pkgs.haskell.compiler.${ghcjsName}.passthru).bootGhcjs;
146 tests.haskell = packagePlatforms pkgs.tests.haskell;
149 inherit (packagePlatforms pkgs.nixosTests)
156 agdaPackages = packagePlatforms pkgs.agdaPackages;
158 # top-level packages that depend on haskellPackages
159 inherit (pkgsPlatforms)
190 haskell-language-server
191 hasura-graphql-engine
197 hledger-check-fancyassertions
204 # hyper-haskell # depends on electron-10.4.7 which is marked as insecure
205 hyper-haskell-server-with-packages
236 pinboard-notes-backup
267 # Members of the elmPackages set that are Haskell derivations
269 inherit (pkgsPlatforms.elmPackages)
277 # GHCs linked to musl.
278 pkgsMusl.haskell.compiler = lib.recursiveUpdate
279 (packagePlatforms pkgs.pkgsMusl.haskell.compiler)
281 # remove musl ghc865Binary since it is known to be broken and
282 # causes an evaluation error on darwin.
283 # TODO: remove ghc865Binary altogether and use ghc8102Binary
289 # Can't be built with musl, see meta.broken comment in the drv
290 integer-simple.ghc884 = {};
291 integer-simple.ghc88 = {};
294 # Get some cache going for MUSL-enabled GHC.
295 pkgsMusl.haskellPackages =
298 # pkgsMusl is compiled natively with musl. It is not
299 # cross-compiled (unlike pkgsStatic). We can only
300 # natively bootstrap GHC with musl on x86_64-linux because
301 # upstream doesn't provide a musl bindist for aarch64.
304 # musl only supports linux, not darwin.
308 inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
315 # Test some statically linked packages to catch regressions
316 # and get some cache going for static compilation with GHC.
317 # Use integer-simple to avoid GMP linking problems (LGPL)
321 "aarch64-linux" # times out on Hydra
322 "x86_64-darwin" # TODO: reenable when static libiconv works on darwin
325 inherit (packagePlatforms pkgs.pkgsStatic.haskellPackages)
331 terminfo # isn't bundled for cross
332 xhtml # isn't bundled for cross
336 haskell.packages.native-bignum.ghc924 = {
337 inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.native-bignum.ghc92)
343 terminfo # isn't bundled for cross
344 xhtml # isn't bundled for cross
349 (versionedCompilerJobs {
350 # Packages which should be checked on more than the
351 # default GHC version. This list can be used to test
352 # the state of the package set with newer compilers
353 # and to confirm that critical packages for the
354 # package sets (like Cabal, jailbreak-cabal) are
355 # working as expected.
356 cabal-install = released;
357 Cabal_3_6_3_0 = released;
358 Cabal_3_8_1_0 = released;
359 cabal2nix = released;
360 cabal2nix-unstable = released;
362 haskell-language-server = released;
366 compilerNames.ghc8107
369 # https://github.com/ndmitchell/hlint/issues/1413
373 jailbreak-cabal = released;
374 language-nix = released;
375 nix-paths = released;
376 titlecase = released;
379 compilerNames.ghc8107
384 compilerNames.ghc8107
387 ghc-lib-parser = released;
388 ghc-lib-parser-ex = released;
390 compilerNames.ghc8107
393 compilerNames.ghc8107
401 compilerNames.ghc8107
404 compilerNames.ghc8107
408 mergeable = pkgs.releaseTools.aggregate {
409 name = "haskell-updates-mergeable";
412 Critical haskell packages that should work at all times,
413 serves as minimum requirement for an update merge
415 maintainers = lib.teams.haskell.members;
417 constituents = accumulateDerivations [
418 # haskell specific tests
420 # important top-level packages
425 jobs.haskell-language-server
433 # important haskell (library) packages
434 jobs.haskellPackages.cabal-plan
435 jobs.haskellPackages.distribution-nixpkgs
436 jobs.haskellPackages.hackage-db
437 jobs.haskellPackages.xmonad
438 jobs.haskellPackages.xmonad-contrib
439 # haskell packages maintained by @peti
440 # imported from the old hydra jobset
441 jobs.haskellPackages.hopenssl
442 jobs.haskellPackages.hsemail
443 jobs.haskellPackages.hsyslog
446 maintained = pkgs.releaseTools.aggregate {
447 name = "maintained-haskell-packages";
449 description = "Aggregate jobset of all haskell packages with a maintainer";
450 maintainers = lib.teams.haskell.members;
452 constituents = accumulateDerivations
454 (name: jobs.haskellPackages."${name}")
455 (maintainedPkgNames pkgs.haskellPackages));
458 muslGHCs = pkgs.releaseTools.aggregate {
459 name = "haskell-pkgsMusl-ghcs";
461 description = "GHCs built with musl";
462 maintainers = with lib.maintainers; [
466 constituents = accumulateDerivations [
467 jobs.pkgsMusl.haskell.compiler.ghc8102Binary
468 jobs.pkgsMusl.haskell.compiler.ghc8107Binary
469 jobs.pkgsMusl.haskell.compiler.ghc884
470 jobs.pkgsMusl.haskell.compiler.ghc8107
471 jobs.pkgsMusl.haskell.compiler.ghc902
472 jobs.pkgsMusl.haskell.compiler.ghc924
473 jobs.pkgsMusl.haskell.compiler.ghcHEAD
474 jobs.pkgsMusl.haskell.compiler.integer-simple.ghc8107
475 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc902
476 jobs.pkgsMusl.haskell.compiler.native-bignum.ghc924
477 jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
481 staticHaskellPackages = pkgs.releaseTools.aggregate {
482 name = "static-haskell-packages";
484 description = "Static haskell builds using the pkgsStatic infrastructure";
486 lib.maintainers.sternenseemann
487 lib.maintainers.rnhmjoj
490 constituents = accumulateDerivations [
491 jobs.pkgsStatic.haskellPackages
492 jobs.pkgsStatic.haskell.packages.native-bignum.ghc924