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/fileset @infinisil @hsjobeki
/maintainers/github-teams.json @infinisil
/maintainers/computed-team-list.nix @infinisil
## Standard environmentrelated libraries
/lib/customisation.nix @alyssais @NixOS/stdenv
/lib/derivations.nix @alyssais @NixOS/stdenv

View File

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