mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-15 04:04:18 +01:00
No team was using the feature of having multiple GitHub teams, and this would make it tricky to try to sync maintainer teams with GitHub teams.
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)
|