2021-05-01 16:00:40 +00:00
|
|
|
/*
|
2021-05-15 02:49:00 +00:00
|
|
|
This is the Hydra jobset for the `haskell-updates` branch in Nixpkgs.
|
|
|
|
You can see the status of this jobset at
|
|
|
|
https://hydra.nixos.org/jobset/nixpkgs/haskell-updates.
|
|
|
|
|
2021-05-01 16:00:40 +00:00
|
|
|
To debug this expression you can use `hydra-eval-jobs` from
|
|
|
|
`pkgs.hydra-unstable` which prints the jobset description
|
|
|
|
to `stdout`:
|
|
|
|
|
|
|
|
$ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix
|
|
|
|
*/
|
2021-05-05 12:51:03 +00:00
|
|
|
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ] }:
|
2021-05-01 16:00:40 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
releaseLib = import ./release-lib.nix {
|
|
|
|
inherit supportedSystems;
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit (releaseLib)
|
2021-07-19 04:49:24 +00:00
|
|
|
lib
|
2021-05-01 16:00:40 +00:00
|
|
|
mapTestOn
|
2021-07-19 04:49:24 +00:00
|
|
|
packagePlatforms
|
|
|
|
pkgs
|
2021-05-01 16:00:40 +00:00
|
|
|
;
|
|
|
|
|
2021-07-19 04:49:24 +00:00
|
|
|
# Helper function which traverses a (nested) set
|
2021-05-01 16:00:40 +00:00
|
|
|
# of derivations produced by mapTestOn and flattens
|
|
|
|
# it to a list of derivations suitable to be passed
|
|
|
|
# to `releaseTools.aggregate` as constituents.
|
2021-07-19 04:49:24 +00:00
|
|
|
# Removes all non derivations from the input jobList.
|
|
|
|
#
|
|
|
|
# accumulateDerivations :: [ Either Derivation AttrSet ] -> [ Derivation ]
|
|
|
|
#
|
|
|
|
# > accumulateDerivations [ drv1 "string" { foo = drv2; bar = { baz = drv3; }; } ]
|
|
|
|
# [ drv1 drv2 drv3 ]
|
2021-05-01 16:00:40 +00:00
|
|
|
accumulateDerivations = jobList:
|
|
|
|
lib.concatMap (
|
|
|
|
attrs:
|
|
|
|
if lib.isDerivation attrs
|
|
|
|
then [ attrs ]
|
|
|
|
else if lib.isAttrs attrs
|
|
|
|
then accumulateDerivations (lib.attrValues attrs)
|
|
|
|
else []
|
|
|
|
) jobList;
|
|
|
|
|
|
|
|
# names of all subsets of `pkgs.haskell.packages`
|
|
|
|
compilerNames = lib.mapAttrs (name: _: name) pkgs.haskell.packages;
|
|
|
|
|
|
|
|
# list of all compilers to test specific packages on
|
|
|
|
all = with compilerNames; [
|
|
|
|
ghc884
|
|
|
|
ghc8104
|
|
|
|
ghc901
|
|
|
|
];
|
|
|
|
|
|
|
|
# packagePlatforms applied to `haskell.packages.*`
|
|
|
|
compilerPlatforms = lib.mapAttrs
|
|
|
|
(_: v: packagePlatforms v)
|
|
|
|
pkgs.haskell.packages;
|
|
|
|
|
|
|
|
# This function lets you specify specific packages
|
|
|
|
# which are to be tested on a list of specific GHC
|
|
|
|
# versions and returns a job set for all specified
|
|
|
|
# combinations. See `jobs` below for an example.
|
|
|
|
versionedCompilerJobs = config: mapTestOn {
|
|
|
|
haskell.packages =
|
|
|
|
(lib.mapAttrs (
|
|
|
|
ghc: jobs:
|
|
|
|
lib.filterAttrs (
|
|
|
|
jobName: platforms:
|
|
|
|
lib.elem ghc (config."${jobName}" or [])
|
|
|
|
) jobs
|
|
|
|
) compilerPlatforms);
|
|
|
|
};
|
|
|
|
|
|
|
|
# hydra jobs for `pkgs` of which we import a subset of
|
2021-05-04 13:38:20 +00:00
|
|
|
pkgsPlatforms = packagePlatforms pkgs;
|
2021-05-01 16:00:40 +00:00
|
|
|
|
2021-05-01 21:37:42 +00:00
|
|
|
# names of packages in an attribute set that are maintained
|
|
|
|
maintainedPkgNames = set: builtins.attrNames
|
|
|
|
(lib.filterAttrs (
|
|
|
|
_: v: builtins.length (v.meta.maintainers or []) > 0
|
|
|
|
) set);
|
|
|
|
|
2021-05-08 16:27:47 +00:00
|
|
|
recursiveUpdateMany = builtins.foldl' lib.recursiveUpdate {};
|
2021-05-01 16:00:40 +00:00
|
|
|
|
2021-07-18 09:15:49 +00:00
|
|
|
# Remove multiple elements from a list at once.
|
|
|
|
#
|
|
|
|
# removeMany
|
|
|
|
# :: [a] -- list of elements to remove
|
|
|
|
# -> [a] -- list of elements from which to remove
|
|
|
|
# -> [a]
|
|
|
|
#
|
|
|
|
# > removeMany ["aarch64-linux" "x86_64-darwin"] ["aarch64-linux" "x86_64-darwin" "x86_64-linux"]
|
|
|
|
# ["x86_64-linux"]
|
2021-07-18 06:18:30 +00:00
|
|
|
removeMany = itemsToRemove: list: lib.foldr lib.remove list itemsToRemove;
|
|
|
|
|
2021-07-18 09:15:49 +00:00
|
|
|
# Recursively remove platforms from the values in an attribute set.
|
|
|
|
#
|
|
|
|
# removePlatforms
|
|
|
|
# :: [String]
|
|
|
|
# -> AttrSet
|
|
|
|
# -> AttrSet
|
|
|
|
#
|
|
|
|
# > attrSet = {
|
|
|
|
# foo = ["aarch64-linux" "x86_64-darwin" "x86_64-linux"];
|
|
|
|
# bar.baz = ["aarch64-linux" "x86_64-linux"];
|
|
|
|
# bar.quux = ["aarch64-linux" "x86_64-darwin"];
|
|
|
|
# }
|
|
|
|
# > removePlatforms ["aarch64-linux" "x86_64-darwin"] attrSet
|
|
|
|
# {
|
|
|
|
# foo = ["x86_64-linux"];
|
|
|
|
# bar = {
|
|
|
|
# baz = ["x86_64-linux"];
|
|
|
|
# quux = [];
|
|
|
|
# };
|
|
|
|
# }
|
2021-07-18 06:18:30 +00:00
|
|
|
removePlatforms = platformsToRemove: packageSet:
|
|
|
|
lib.mapAttrsRecursive
|
|
|
|
(_: val:
|
|
|
|
if lib.isList val
|
|
|
|
then removeMany platformsToRemove val
|
|
|
|
else val
|
|
|
|
)
|
|
|
|
packageSet;
|
2021-05-22 13:05:10 +00:00
|
|
|
|
2021-05-08 23:49:17 +00:00
|
|
|
jobs = recursiveUpdateMany [
|
|
|
|
(mapTestOn {
|
2021-05-08 16:27:47 +00:00
|
|
|
haskellPackages = packagePlatforms pkgs.haskellPackages;
|
|
|
|
haskell.compiler = packagePlatforms pkgs.haskell.compiler;
|
2021-05-01 16:00:40 +00:00
|
|
|
|
2021-07-13 13:19:36 +00:00
|
|
|
tests.haskell = packagePlatforms pkgs.tests.haskell;
|
2021-05-08 16:27:47 +00:00
|
|
|
|
2021-07-15 10:35:15 +00:00
|
|
|
nixosTests.agda = (packagePlatforms pkgs.nixosTests).agda;
|
|
|
|
agdaPackages = packagePlatforms pkgs.agdaPackages;
|
|
|
|
|
2021-05-08 16:27:47 +00:00
|
|
|
# top-level packages that depend on haskellPackages
|
|
|
|
inherit (pkgsPlatforms)
|
|
|
|
agda
|
|
|
|
arion
|
|
|
|
bench
|
|
|
|
bustle
|
|
|
|
blucontrol
|
|
|
|
cabal-install
|
|
|
|
cabal2nix
|
|
|
|
cachix
|
|
|
|
carp
|
|
|
|
cedille
|
|
|
|
client-ip-echo
|
|
|
|
darcs
|
|
|
|
dconf2nix
|
|
|
|
dhall
|
|
|
|
dhall-bash
|
|
|
|
dhall-docs
|
|
|
|
dhall-lsp-server
|
|
|
|
dhall-json
|
|
|
|
dhall-nix
|
|
|
|
dhall-text
|
|
|
|
diagrams-builder
|
|
|
|
elm2nix
|
|
|
|
fffuu
|
|
|
|
futhark
|
|
|
|
ghcid
|
|
|
|
git-annex
|
|
|
|
git-brunch
|
|
|
|
gitit
|
|
|
|
glirc
|
|
|
|
hadolint
|
|
|
|
haskell-ci
|
|
|
|
haskell-language-server
|
|
|
|
hasura-graphql-engine
|
|
|
|
hci
|
|
|
|
hercules-ci-agent
|
|
|
|
hinit
|
|
|
|
hedgewars
|
|
|
|
hledger
|
|
|
|
hledger-iadd
|
|
|
|
hledger-interest
|
|
|
|
hledger-ui
|
|
|
|
hledger-web
|
|
|
|
hlint
|
|
|
|
hpack
|
|
|
|
hyper-haskell
|
|
|
|
hyper-haskell-server-with-packages
|
|
|
|
icepeak
|
|
|
|
idris
|
|
|
|
ihaskell
|
|
|
|
jl
|
|
|
|
koka
|
|
|
|
krank
|
|
|
|
lambdabot
|
|
|
|
madlang
|
|
|
|
matterhorn
|
|
|
|
mueval
|
|
|
|
neuron-notes
|
|
|
|
niv
|
|
|
|
nix-delegate
|
|
|
|
nix-deploy
|
|
|
|
nix-diff
|
|
|
|
nix-linter
|
|
|
|
nix-output-monitor
|
|
|
|
nix-script
|
|
|
|
nix-tree
|
|
|
|
nixfmt
|
|
|
|
nota
|
2021-06-03 09:51:34 +00:00
|
|
|
nvfetcher
|
2021-05-08 16:27:47 +00:00
|
|
|
ormolu
|
|
|
|
pandoc
|
|
|
|
pakcs
|
|
|
|
petrinizer
|
|
|
|
place-cursor-at
|
|
|
|
pinboard-notes-backup
|
|
|
|
pretty-simple
|
|
|
|
shake
|
|
|
|
shellcheck
|
|
|
|
sourceAndTags
|
|
|
|
spacecookie
|
|
|
|
spago
|
|
|
|
splot
|
|
|
|
stack
|
|
|
|
stack2nix
|
|
|
|
stutter
|
|
|
|
stylish-haskell
|
|
|
|
taffybar
|
|
|
|
tamarin-prover
|
|
|
|
taskell
|
|
|
|
termonad-with-packages
|
|
|
|
tldr-hs
|
|
|
|
tweet-hs
|
|
|
|
update-nix-fetchgit
|
2021-06-03 09:51:34 +00:00
|
|
|
uusi
|
2021-05-08 16:27:47 +00:00
|
|
|
uqm
|
|
|
|
uuagc
|
|
|
|
vaultenv
|
|
|
|
wstunnel
|
|
|
|
xmobar
|
|
|
|
xmonad-with-packages
|
|
|
|
yi
|
|
|
|
zsh-git-prompt
|
|
|
|
;
|
2021-05-01 16:00:40 +00:00
|
|
|
|
2021-05-08 16:27:47 +00:00
|
|
|
elmPackages.elm = pkgsPlatforms.elmPackages.elm;
|
2021-07-18 06:14:30 +00:00
|
|
|
|
2021-07-18 06:17:02 +00:00
|
|
|
# GHCs linked to musl.
|
|
|
|
pkgsMusl.haskell.compiler = packagePlatforms pkgs.pkgsMusl.haskell.compiler // {
|
|
|
|
# remove musl ghc865Binary since it is known to be broken and
|
|
|
|
# causes an evaluation error on darwin.
|
|
|
|
# TODO: remove ghc865Binary altogether and use ghc8102Binary
|
|
|
|
ghc865Binary = {};
|
|
|
|
|
|
|
|
# remove integer-simple because it appears to be broken with
|
|
|
|
# musl and non-static-linking.
|
|
|
|
integer-simple = {};
|
|
|
|
};
|
|
|
|
|
2021-07-18 06:18:30 +00:00
|
|
|
# Get some cache going for MUSL-enabled GHC.
|
|
|
|
pkgsMusl.haskellPackages =
|
|
|
|
removePlatforms
|
|
|
|
[
|
|
|
|
"aarch64-linux" # aarch64 does not appear to be supported
|
|
|
|
"x86_64-darwin" # musl only supports linux
|
|
|
|
]
|
|
|
|
{
|
|
|
|
inherit (packagePlatforms pkgs.pkgsMusl.haskellPackages)
|
|
|
|
hello
|
|
|
|
lens
|
|
|
|
random
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
2021-07-18 06:14:30 +00:00
|
|
|
# Test some statically linked packages to catch regressions
|
|
|
|
# and get some cache going for static compilation with GHC.
|
|
|
|
# Use integer-simple to avoid GMP linking problems (LGPL)
|
|
|
|
pkgsStatic.haskell.packages.integer-simple.ghc8104 =
|
|
|
|
removePlatforms
|
|
|
|
[
|
|
|
|
"aarch64-linux" # times out on Hydra
|
|
|
|
"x86_64-darwin" # TODO: reenable when static libiconv works on darwin
|
|
|
|
]
|
|
|
|
{
|
|
|
|
inherit (packagePlatforms pkgs.pkgsStatic.haskell.packages.integer-simple.ghc8104)
|
|
|
|
hello
|
|
|
|
lens
|
|
|
|
random
|
|
|
|
;
|
|
|
|
};
|
2021-05-08 23:49:17 +00:00
|
|
|
})
|
2021-05-08 16:27:47 +00:00
|
|
|
(versionedCompilerJobs {
|
|
|
|
# Packages which should be checked on more than the
|
|
|
|
# default GHC version. This list can be used to test
|
|
|
|
# the state of the package set with newer compilers
|
|
|
|
# and to confirm that critical packages for the
|
|
|
|
# package sets (like Cabal, jailbreak-cabal) are
|
|
|
|
# working as expected.
|
|
|
|
cabal-install = all;
|
|
|
|
Cabal_3_4_0_0 = with compilerNames; [ ghc884 ghc8104 ];
|
2021-06-11 22:36:30 +00:00
|
|
|
cabal2nix-unstable = all;
|
2021-05-08 16:27:47 +00:00
|
|
|
funcmp = all;
|
2021-05-16 05:41:24 +00:00
|
|
|
# Doesn't currently work on ghc-9.0:
|
|
|
|
# https://github.com/haskell/haskell-language-server/issues/297
|
|
|
|
haskell-language-server = with compilerNames; [ ghc884 ghc8104 ];
|
2021-05-08 16:27:47 +00:00
|
|
|
hoogle = all;
|
|
|
|
hsdns = all;
|
|
|
|
jailbreak-cabal = all;
|
|
|
|
language-nix = all;
|
|
|
|
nix-paths = all;
|
|
|
|
titlecase = all;
|
|
|
|
})
|
|
|
|
{
|
|
|
|
mergeable = pkgs.releaseTools.aggregate {
|
|
|
|
name = "haskell-updates-mergeable";
|
|
|
|
meta = {
|
|
|
|
description = ''
|
|
|
|
Critical haskell packages that should work at all times,
|
|
|
|
serves as minimum requirement for an update merge
|
|
|
|
'';
|
|
|
|
maintainers = lib.teams.haskell.members;
|
|
|
|
};
|
|
|
|
constituents = accumulateDerivations [
|
|
|
|
# haskell specific tests
|
2021-07-17 04:30:51 +00:00
|
|
|
#
|
|
|
|
# TODO: The writers test appears to be failing on darwin for unknown
|
|
|
|
# reasons. See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881307871.
|
|
|
|
(lib.recursiveUpdate jobs.tests.haskell { writers.x86_64-darwin = null; })
|
2021-05-08 16:27:47 +00:00
|
|
|
# important top-level packages
|
|
|
|
jobs.cabal-install
|
|
|
|
jobs.cabal2nix
|
|
|
|
jobs.cachix
|
|
|
|
jobs.darcs
|
|
|
|
jobs.haskell-language-server
|
|
|
|
jobs.hledger
|
|
|
|
jobs.hledger-ui
|
|
|
|
jobs.hpack
|
|
|
|
jobs.niv
|
|
|
|
jobs.pandoc
|
|
|
|
jobs.stack
|
|
|
|
jobs.stylish-haskell
|
|
|
|
# important haskell (library) packages
|
|
|
|
jobs.haskellPackages.cabal-plan
|
|
|
|
jobs.haskellPackages.distribution-nixpkgs
|
|
|
|
jobs.haskellPackages.hackage-db
|
|
|
|
jobs.haskellPackages.policeman
|
|
|
|
jobs.haskellPackages.xmonad
|
|
|
|
jobs.haskellPackages.xmonad-contrib
|
|
|
|
# haskell packages maintained by @peti
|
|
|
|
# imported from the old hydra jobset
|
|
|
|
jobs.haskellPackages.hopenssl
|
|
|
|
jobs.haskellPackages.hsemail
|
|
|
|
jobs.haskellPackages.hsyslog
|
|
|
|
];
|
2021-05-01 16:00:40 +00:00
|
|
|
};
|
2021-05-08 16:27:47 +00:00
|
|
|
maintained = pkgs.releaseTools.aggregate {
|
|
|
|
name = "maintained-haskell-packages";
|
|
|
|
meta = {
|
|
|
|
description = "Aggregate jobset of all haskell packages with a maintainer";
|
|
|
|
maintainers = lib.teams.haskell.members;
|
|
|
|
};
|
|
|
|
constituents = accumulateDerivations
|
|
|
|
(builtins.map
|
|
|
|
(name: jobs.haskellPackages."${name}")
|
|
|
|
(maintainedPkgNames pkgs.haskellPackages));
|
2021-05-01 21:37:42 +00:00
|
|
|
};
|
2021-07-18 06:00:58 +00:00
|
|
|
|
|
|
|
muslGHCs = pkgs.releaseTools.aggregate {
|
|
|
|
name = "haskell-pkgsMusl-ghcs";
|
|
|
|
meta = {
|
|
|
|
description = "GHCs built with musl";
|
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
nh2
|
|
|
|
];
|
|
|
|
};
|
|
|
|
constituents = accumulateDerivations [
|
|
|
|
jobs.pkgsMusl.haskell.compiler.ghc8102Binary
|
|
|
|
jobs.pkgsMusl.haskell.compiler.ghc884
|
|
|
|
jobs.pkgsMusl.haskell.compiler.ghc8104
|
|
|
|
jobs.pkgsMusl.haskell.compiler.ghc901
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-05-22 13:05:10 +00:00
|
|
|
staticHaskellPackages = pkgs.releaseTools.aggregate {
|
|
|
|
name = "static-haskell-packages";
|
|
|
|
meta = {
|
|
|
|
description = "Static haskell builds using the pkgsStatic infrastructure";
|
|
|
|
maintainers = [
|
|
|
|
lib.maintainers.sternenseemann
|
|
|
|
lib.maintainers.rnhmjoj
|
|
|
|
];
|
|
|
|
};
|
2021-07-19 04:49:24 +00:00
|
|
|
constituents = accumulateDerivations [
|
|
|
|
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.hello
|
|
|
|
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.lens
|
|
|
|
jobs.pkgsStatic.haskell.packages.integer-simple.ghc8104.random
|
2021-05-25 10:38:30 +00:00
|
|
|
];
|
2021-05-22 13:05:10 +00:00
|
|
|
};
|
2021-05-08 16:27:47 +00:00
|
|
|
}
|
2021-05-08 23:49:17 +00:00
|
|
|
];
|
2021-05-01 16:00:40 +00:00
|
|
|
|
|
|
|
in jobs
|