lib.teams: Populate fields from synced GitHub state

The before and after of

    nix-instantiate --eval -A lib.teams --strict --json | jq 'walk(if type == "array" then sort else . end)'

has been ensured to be negligible, only consisting of minor team
shortName and scope differences
This commit is contained in:
Silvan Mosberger
2025-10-11 02:26:51 +02:00
parent 6d89dcd577
commit 428bd8f1a2
5 changed files with 57 additions and 322 deletions

View File

@@ -33,6 +33,7 @@
/lib/path/* @infinisil @hsjobeki /lib/path/* @infinisil @hsjobeki
/lib/fileset @infinisil @hsjobeki /lib/fileset @infinisil @hsjobeki
/maintainers/github-teams.json @infinisil /maintainers/github-teams.json @infinisil
/maintainers/computed-team-list.nix @infinisil
## Standard environmentrelated libraries ## Standard environmentrelated libraries
/lib/customisation.nix @alyssais @NixOS/stdenv /lib/customisation.nix @alyssais @NixOS/stdenv
/lib/derivations.nix @alyssais @NixOS/stdenv /lib/derivations.nix @alyssais @NixOS/stdenv

View File

@@ -63,7 +63,7 @@ let
customisation = callLibs ./customisation.nix; customisation = callLibs ./customisation.nix;
derivations = callLibs ./derivations.nix; derivations = callLibs ./derivations.nix;
maintainers = import ../maintainers/maintainer-list.nix; maintainers = import ../maintainers/maintainer-list.nix;
teams = callLibs ../maintainers/team-list.nix; teams = callLibs ../maintainers/computed-team-list.nix;
meta = callLibs ./meta.nix; meta = callLibs ./meta.nix;
versions = callLibs ./versions.nix; versions = callLibs ./versions.nix;

View File

@@ -158,13 +158,17 @@ If the team lists no specific membership policy, feel free to merge changes to t
> [!IMPORTANT] > [!IMPORTANT]
> If a team says it is a closed group, do not merge additions to the team without an approval by at least one existing member. > If a team says it is a closed group, do not merge additions to the team without an approval by at least one existing member.
A corresponding GitHub team can be created by any org member. #### Synced GitHub teams
As an alternative to tracking team members in `team-list.nix`, a corresponding GitHub team can be created by any org member and its members subsequently managed directly on GitHub.
When creating the team it should be created with the `nixpkgs-maintainers` team as parent. When creating the team it should be created with the `nixpkgs-maintainers` team as parent.
Once approved, the team will have the right privileges to be pinged and requested for review in Nixpkgs. Once approved, the team will have the right privileges to be pinged and requested for review in Nixpkgs.
> [!TIP] > [!TIP]
> The team name should be as short as possible; because it is nested under the maintainers group, no -maintainers suffix is needed. > The team name should be as short as possible; because it is nested under the maintainers group, no -maintainers suffix is needed.
After the first [weekly team sync](../.github/workflows/team-sync.yml) with the new team, it's then also possible to link it to the entry in `team-list.nix` by setting its `github` field to the GitHub team name.
# Maintainer scripts # Maintainer scripts
Various utility scripts, which are mainly useful for nixpkgs maintainers, are available under `./scripts/`. Various utility scripts, which are mainly useful for nixpkgs maintainers, are available under `./scripts/`.

View File

@@ -0,0 +1,49 @@
# Extends ./team-list.nix with synced GitHub information from ./github-teams.json
{ lib }:
let
githubTeams = lib.importJSON ./github-teams.json;
teams = import ./team-list.nix { inherit lib; };
# A fast maintainer id lookup table
maintainersById = lib.pipe lib.maintainers [
lib.attrValues
(lib.groupBy (attrs: toString attrs.githubId))
(lib.mapAttrs (_: lib.head))
];
maintainerSetToList =
githubTeam:
lib.mapAttrsToList (
login: id:
maintainersById.${toString id}
or (throw "lib.teams: No maintainer entry for GitHub user @${login} who's part of the @NixOS/${githubTeam} team")
);
in
lib.mapAttrs (
name: attrs:
if attrs ? github then
let
githubTeam =
githubTeams.${attrs.github}
or (throw "lib.teams.${name}: Corresponding GitHub team ${attrs.github} not known yet, make sure to create it and wait for the regular team sync");
in
assert lib.assertMsg (!attrs ? shortName)
"lib.teams.${name}: Both `shortName` and `github` is set, but the former is synced from the latter";
assert lib.assertMsg (
!attrs ? scope
) "lib.teams.${name}: Both `scope` and `github` is set, but the former is synced from the latter";
assert lib.assertMsg (
!attrs ? members
) "lib.teams.${name}: Both `members` and `github` is set, but the former is synced from the latter";
attrs
// {
shortName = githubTeam.name;
scope = githubTeam.description;
members =
maintainerSetToList attrs.github githubTeam.maintainers
++ maintainerSetToList attrs.github githubTeam.members;
}
else
attrs
) teams

View File

@@ -1,11 +1,9 @@
/* /*
List of maintainer teams. List of maintainer teams.
name = { name = {
# Required
members = [ maintainer1 maintainer2 ]; members = [ maintainer1 maintainer2 ];
scope = "Maintain foo packages."; scope = "Maintain foo packages.";
shortName = "foo"; shortName = "foo";
# Optional
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
github = "my-subsystem"; github = "my-subsystem";
}; };
@@ -18,7 +16,7 @@
- `enableFeatureFreezePing` will ping this team during the Feature Freeze announcements on releases - `enableFeatureFreezePing` will ping this team during the Feature Freeze announcements on releases
- There is limited mention capacity in a single post, so this should be reserved for critical components - There is limited mention capacity in a single post, so this should be reserved for critical components
or larger ecosystems within nixpkgs. or larger ecosystems within nixpkgs.
- `github` will ping the specified GitHub team as well - `github` will ping the specified GitHub team and sync the `members`, `scope` and `shortName` fields from it
More fields may be added in the future. More fields may be added in the future.
@@ -56,16 +54,7 @@ with lib.maintainers;
}; };
android = { android = {
members = [
adrian-gierakowski
hadilq
johnrtitor
numinit
RossComputerGuy
];
scope = "Maintain Android-related tooling in nixpkgs.";
github = "android"; github = "android";
shortName = "Android";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -106,20 +95,7 @@ with lib.maintainers;
}; };
beam = { beam = {
members = [
adamcstephens
ankhers
Br1ght0ne
DianaOlympos
gleber
happysalada
minijackson
yurrriq
savtrip
];
github = "beam"; github = "beam";
scope = "Maintain BEAM-related packages and modules.";
shortName = "BEAM";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -193,34 +169,11 @@ with lib.maintainers;
}; };
categorization = { categorization = {
members = [
aleksana
fgaz
getpsyched
lyndeno
natsukium
philiptaron
pyrotelekinetic
raskin
sigmasquadron
tomodachi94
];
github = "categorization"; github = "categorization";
scope = "Maintain the categorization system in Nixpkgs, per RFC 146. This team has authority over all categorization issues in Nixpkgs.";
shortName = "Categorization";
}; };
ci = { ci = {
members = [
MattSturgeon
mic92
philiptaron
wolfgangwalther
zowoq
];
github = "nixpkgs-ci"; github = "nixpkgs-ci";
scope = "Maintain Nixpkgs' in-tree Continuous Integration, including GitHub Actions.";
shortName = "CI";
}; };
cinnamon = { cinnamon = {
@@ -262,21 +215,7 @@ with lib.maintainers;
}; };
cosmic = { cosmic = {
members = [
a-kenji
ahoneybun
drakon64
griffi-gh
HeitorAugustoLN
nyabinary
pandapip1
qyliss
thefossguy
michaelBelsanti
];
github = "cosmic"; github = "cosmic";
shortName = "cosmic";
scope = "Maintain the COSMIC DE and related packages.";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -290,15 +229,6 @@ with lib.maintainers;
}; };
cuda = { cuda = {
members = [
connorbaker
GaetanLepage
prusnak
samuela
SomeoneSerge
];
scope = "Maintain CUDA-enabled packages";
shortName = "Cuda";
github = "cuda-maintainers"; github = "cuda-maintainers";
}; };
@@ -315,14 +245,7 @@ with lib.maintainers;
}; };
darwin = { darwin = {
members = [
emily
reckenrode
toonn
];
github = "darwin-core"; github = "darwin-core";
scope = "Maintain core platform support and packages for macOS and other Apple platforms.";
shortName = "Darwin";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -366,14 +289,7 @@ with lib.maintainers;
}; };
docs = { docs = {
members = [
alejandrosame
wamirez
hsjobeki
];
github = "documentation-team"; github = "documentation-team";
scope = "Maintain nixpkgs/NixOS documentation and tools for building it.";
shortName = "Docs";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -414,22 +330,11 @@ with lib.maintainers;
}; };
enlightenment = { enlightenment = {
members = [ romildo ];
github = "enlightenment"; github = "enlightenment";
scope = "Maintain Enlightenment desktop environment and related packages.";
shortName = "Enlightenment";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
flutter = { flutter = {
members = [
mkg20001
RossComputerGuy
FlafyDev
hacker1024
];
scope = "Maintain Flutter and Dart-related packages and build tools";
shortName = "flutter";
enableFeatureFreezePing = false; enableFeatureFreezePing = false;
github = "flutter"; github = "flutter";
}; };
@@ -490,18 +395,7 @@ with lib.maintainers;
}; };
geospatial = { geospatial = {
members = [
autra
imincik
l0b0
nh2
nialov
sikmir
willcohen
];
github = "geospatial"; github = "geospatial";
scope = "Maintain geospatial, remote sensing and OpenStreetMap software.";
shortName = "Geospatial";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -518,15 +412,7 @@ with lib.maintainers;
}; };
gnome = { gnome = {
members = [
bobby285271
hedning
jtojnar
dasj19
];
github = "gnome"; github = "gnome";
scope = "Maintain GNOME desktop environment and platform.";
shortName = "GNOME";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -541,17 +427,7 @@ with lib.maintainers;
}; };
golang = { golang = {
members = [
kalbasit
katexochen
mic92
zowoq
qbit
mfrw
];
github = "golang"; github = "golang";
scope = "Maintain Golang compilers.";
shortName = "Go";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -567,15 +443,7 @@ with lib.maintainers;
}; };
haskell = { haskell = {
members = [
cdepillabout
maralorn
sternenseemann
wolfgangwalther
];
github = "haskell"; github = "haskell";
scope = "Maintain Haskell packages and infrastructure.";
shortName = "Haskell";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -601,16 +469,7 @@ with lib.maintainers;
}; };
hyprland = { hyprland = {
members = [
donovanglover
fufexan
johnrtitor
khaneliman
NotAShelf
];
github = "hyprland"; github = "hyprland";
scope = "Maintain Hyprland compositor and ecosystem";
shortName = "Hyprland";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -632,15 +491,6 @@ with lib.maintainers;
java = { java = {
github = "java"; github = "java";
members = [
chayleaf
fliegendewurst
infinidoge
tomodachi94
msgilligan
];
shortName = "Java";
scope = "Maintainers of the Nixpkgs Java ecosystem (JDK, JVM, Java, Gradle, Maven, Ant, and adjacent projects)";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -679,17 +529,6 @@ with lib.maintainers;
k3s = { k3s = {
github = "k3s"; github = "k3s";
members = [
euank
frederictobiasc
heywoodlh
marcusramberg
mic92
rorosen
wrmilling
];
scope = "Maintain K3s package, NixOS module, NixOS tests, update script";
shortName = "K3s";
}; };
kodi = { kodi = {
@@ -741,16 +580,7 @@ with lib.maintainers;
}; };
lisp = { lisp = {
members = [
raskin
lukego
nagy
uthar
hraban
];
github = "lisp"; github = "lisp";
scope = "Maintain the Lisp ecosystem.";
shortName = "lisp";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -768,19 +598,7 @@ with lib.maintainers;
}; };
llvm = { llvm = {
members = [
dtzWill
emily
ericson2314
lovek323
qyliss
RossComputerGuy
rrbutani
sternenseemann
];
github = "llvm"; github = "llvm";
scope = "Maintain LLVM package sets and related packages";
shortName = "LLVM";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -792,30 +610,12 @@ with lib.maintainers;
}; };
loongarch64 = { loongarch64 = {
members = [
aleksana
Cryolitia
darkyzhou
dramforever
wegank
];
github = "loongarch64"; github = "loongarch64";
scope = "Maintain LoongArch64 related packages and code";
shortName = "LoongArch64";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
lua = { lua = {
members = [
raskin
khaneliman
teto
arobyn
scoder12
];
github = "lua"; github = "lua";
scope = "Maintain the lua ecosystem.";
shortName = "lua";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -830,10 +630,7 @@ with lib.maintainers;
}; };
lumina = { lumina = {
members = [ romildo ];
github = "lumina"; github = "lumina";
scope = "Maintain lumina desktop environment and related packages.";
shortName = "Lumina";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -849,23 +646,12 @@ with lib.maintainers;
}; };
lxqt = { lxqt = {
members = [ romildo ];
github = "lxqt"; github = "lxqt";
scope = "Maintain LXQt desktop environment and related packages.";
shortName = "LXQt";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
marketing = { marketing = {
members = [
djacu
flyfloh
thilobillerbeck
tomberek
];
github = "marketing-team"; github = "marketing-team";
scope = "Marketing of Nix/NixOS/nixpkgs.";
shortName = "Marketing";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -929,15 +715,7 @@ with lib.maintainers;
}; };
neovim = { neovim = {
members = [
GaetanLepage
khaneliman
mrcjkb
perchun
];
github = "neovim"; github = "neovim";
scope = "Maintain the vim and neovim text editors and related packages.";
shortName = "Vim/Neovim";
}; };
nextcloud = { nextcloud = {
@@ -995,15 +773,7 @@ with lib.maintainers;
}; };
ocaml = { ocaml = {
members = [
alizter
redianthus
romildo
ulrikstrid
];
github = "ocaml"; github = "ocaml";
scope = "Maintain the OCaml compiler and package set.";
shortName = "OCaml";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1035,13 +805,7 @@ with lib.maintainers;
}; };
pantheon = { pantheon = {
members = [
davidak
bobby285271
];
github = "pantheon"; github = "pantheon";
scope = "Maintain Pantheon desktop environment and platform.";
shortName = "Pantheon";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1057,26 +821,12 @@ with lib.maintainers;
}; };
php = { php = {
members = [
aanderse
ma27
piotrkwiecinski
talyz
];
github = "php"; github = "php";
scope = "Maintain PHP related packages and extensions.";
shortName = "PHP";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
podman = { podman = {
members = [
saschagrunert
vdemeester
];
github = "podman"; github = "podman";
scope = "Maintain Podman and CRI-O related packages and modules.";
shortName = "Podman";
}; };
postgres = { postgres = {
@@ -1101,23 +851,7 @@ with lib.maintainers;
}; };
qt-kde = { qt-kde = {
members = [
ilya-fedin
k900
LunNova
mjm
nickcao
SuperSandro2000
ttuegel
fridh
shamilton
bkchr
peterhoeg
nyanloutre
];
github = "qt-kde"; github = "qt-kde";
scope = "Maintain the Qt framework, KDE application suite, Plasma desktop environment and related projects.";
shortName = "Qt / KDE";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1144,28 +878,11 @@ with lib.maintainers;
}; };
rocm = { rocm = {
members = [
Flakebi
GZGavinZhao
LunNova
mschwaig
];
github = "rocm"; github = "rocm";
scope = "Maintain ROCm and related packages.";
shortName = "ROCm";
}; };
rust = { rust = {
members = [
figsoda
mic92
tjni
winter
zowoq
];
github = "rust"; github = "rust";
scope = "Maintain the Rust compiler toolchain and nixpkgs integration.";
shortName = "Rust";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1180,16 +897,7 @@ with lib.maintainers;
}; };
sdl = { sdl = {
members = [
evythedemon
grimmauld
jansol
marcin-serwin
pbsds
];
github = "sdl"; github = "sdl";
scope = "Maintain core SDL libraries.";
shortName = "SDL";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1216,16 +924,6 @@ with lib.maintainers;
}; };
stdenv = { stdenv = {
members = [
artturin
emily
ericson2314
philiptaron
reckenrode
RossComputerGuy
];
scope = "Maintain the standard environment and its surrounding logic.";
shortName = "stdenv";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
github = "stdenv"; github = "stdenv";
}; };
@@ -1262,16 +960,7 @@ with lib.maintainers;
}; };
systemd = { systemd = {
members = [
flokli
arianvp
elvishjerricco
aanderse
grimmauld
];
github = "systemd"; github = "systemd";
scope = "Maintain systemd for NixOS.";
shortName = "systemd";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
}; };
@@ -1321,14 +1010,6 @@ with lib.maintainers;
}; };
xen = { xen = {
members = [
hehongbo
lach
sigmasquadron
rane
];
scope = "Maintain the Xen Project Hypervisor and the related tooling ecosystem.";
shortName = "Xen Project Hypervisor";
enableFeatureFreezePing = true; enableFeatureFreezePing = true;
github = "xen-project"; github = "xen-project";
}; };