2024-10-18 09:44:59 +01:00
|
|
|
{
|
2025-05-25 17:56:54 +01:00
|
|
|
lib,
|
2024-10-18 09:44:59 +01:00
|
|
|
self,
|
2025-05-25 17:12:19 +01:00
|
|
|
inputs,
|
2024-10-18 09:44:59 +01:00
|
|
|
helpers,
|
|
|
|
...
|
|
|
|
}:
|
2024-05-05 19:39:35 +02:00
|
|
|
{
|
|
|
|
perSystem =
|
2025-01-19 12:55:15 +00:00
|
|
|
{ pkgs, ... }:
|
2024-05-05 19:39:35 +02:00
|
|
|
{
|
2025-02-22 16:02:13 +00:00
|
|
|
checks = pkgs.callPackages ../../tests {
|
2025-01-19 12:55:15 +00:00
|
|
|
inherit helpers self;
|
2024-10-18 09:44:59 +01:00
|
|
|
};
|
2024-01-06 17:57:24 +01:00
|
|
|
};
|
2025-05-25 17:12:19 +01:00
|
|
|
|
|
|
|
# Output a build matrix for CI
|
|
|
|
flake.githubActions = inputs.nix-github-actions.lib.mkGithubMatrix {
|
2025-05-25 17:56:54 +01:00
|
|
|
checks = builtins.mapAttrs (
|
|
|
|
system:
|
|
|
|
lib.flip lib.pipe [
|
|
|
|
lib.attrsToList
|
|
|
|
# Group the "test-N" tests back into one drv
|
|
|
|
# FIXME: drop the entire test-grouping system
|
|
|
|
(builtins.groupBy ({ name, value }: if lib.strings.hasPrefix "test-" name then "test" else name))
|
|
|
|
(builtins.mapAttrs (
|
|
|
|
group: tests:
|
|
|
|
let
|
|
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
|
|
singleton = (builtins.head tests).value;
|
|
|
|
joined = pkgs.linkFarmFromDrvs group (builtins.listToAttrs tests);
|
|
|
|
in
|
|
|
|
if builtins.length tests > 1 then joined else singleton
|
|
|
|
))
|
|
|
|
]
|
|
|
|
) self.checks;
|
2025-05-25 17:12:19 +01:00
|
|
|
};
|
2023-12-06 13:09:26 +01:00
|
|
|
}
|