Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
62 lines
1.3 KiB
Nix
62 lines
1.3 KiB
Nix
# to run these tests:
|
|
# nix-build nixpkgs/lib/tests/teams.nix
|
|
# If it builds, all tests passed
|
|
{
|
|
pkgs ? import ../.. { },
|
|
lib ? pkgs.lib,
|
|
}:
|
|
|
|
let
|
|
inherit (lib) types;
|
|
|
|
teamModule =
|
|
{ config, ... }:
|
|
{
|
|
options = {
|
|
shortName = lib.mkOption {
|
|
type = types.str;
|
|
};
|
|
scope = lib.mkOption {
|
|
type = types.str;
|
|
};
|
|
enableFeatureFreezePing = lib.mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
members = lib.mkOption {
|
|
type = types.listOf (types.submodule (import ./maintainer-module.nix { inherit lib; }));
|
|
default = [ ];
|
|
};
|
|
github = lib.mkOption {
|
|
type = types.str;
|
|
default = "";
|
|
};
|
|
};
|
|
};
|
|
|
|
checkTeam =
|
|
team: uncheckedAttrs:
|
|
let
|
|
prefix = [
|
|
"lib"
|
|
"maintainer-team"
|
|
team
|
|
];
|
|
checkedAttrs =
|
|
(lib.modules.evalModules {
|
|
inherit prefix;
|
|
modules = [
|
|
teamModule
|
|
{
|
|
_file = toString ../../maintainers/team-list.nix;
|
|
config = uncheckedAttrs;
|
|
}
|
|
];
|
|
}).config;
|
|
in
|
|
checkedAttrs;
|
|
|
|
checkedTeams = lib.mapAttrs checkTeam lib.teams;
|
|
in
|
|
pkgs.writeTextDir "maintainer-teams.json" (builtins.toJSON checkedTeams)
|