lol
1# Maintainer scripts
2
3This folder contains various executable scripts for nixpkgs maintainers,
4and supporting data or nixlang files as needed.
5These scripts generally aren't a stable interface and may changed or be removed.
6
7What follows is a (very incomplete) overview of available scripts.
8
9
10## Metadata
11
12### `check-by-name.sh`
13
14An alias for `pkgs/test/check-by-name/run-local.sh`, see [documentation](../../pkgs/test/check-by-name/README.md).
15
16### `get-maintainer.sh`
17
18`get-maintainer.sh [selector] value` returns a JSON object describing
19a given nixpkgs maintainer, equivalent to `lib.maintainers.${x} // { handle = x; }`.
20
21This allows looking up a maintainer's attrset (including GitHub and Matrix
22handles, email address etc.) based on any of their handles, more correctly and
23robustly than text search through `maintainers-list.nix`.
24
25```
26❯ ./get-maintainer.sh nicoo
27{
28 "email": "nicoo@debian.org",
29 "github": "nbraud",
30 "githubId": 1155801,
31 "keys": [
32 {
33 "fingerprint": "E44E 9EA5 4B8E 256A FB73 49D3 EC9D 3708 72BC 7A8C"
34 }
35 ],
36 "name": "nicoo",
37 "handle": "nicoo"
38}
39
40❯ ./get-maintainer.sh name 'Silvan Mosberger'
41{
42 "email": "contact@infinisil.com",
43 "github": "infinisil",
44 "githubId": 20525370,
45 "keys": [
46 {
47 "fingerprint": "6C2B 55D4 4E04 8266 6B7D DA1A 422E 9EDA E015 7170"
48 }
49 ],
50 "matrix": "@infinisil:matrix.org",
51 "name": "Silvan Mosberger",
52 "handle": "infinisil"
53}
54```
55
56The maintainer is designated by a `selector` which must be one of:
57- `handle` (default): the maintainer's attribute name in `lib.maintainers`;
58- `email`, `name`, `github`, `githubId`, `matrix`, `name`:
59 attributes of the maintainer's object, matched exactly;
60 see [`maintainer-list.nix`] for the fields' definition.
61
62[`maintainer-list.nix`]: ../maintainer-list.nix