3 This folder contains various executable scripts for nixpkgs maintainers,
4 and supporting data or nixlang files as needed.
5 These scripts generally aren't a stable interface and may changed or be removed.
7 What follows is a (very incomplete) overview of available scripts.
12 ### `get-maintainer.sh`
14 `get-maintainer.sh [selector] value` returns a JSON object describing
15 a given nixpkgs maintainer, equivalent to `lib.maintainers.${x} // { handle = x; }`.
17 This allows looking up a maintainer's attrset (including GitHub and Matrix
18 handles, email address etc.) based on any of their handles, more correctly and
19 robustly than text search through `maintainers-list.nix`.
22 ❯ ./get-maintainer.sh nicoo
24 "email": "nicoo@debian.org",
29 "fingerprint": "E44E 9EA5 4B8E 256A FB73 49D3 EC9D 3708 72BC 7A8C"
36 ❯ ./get-maintainer.sh name 'Silvan Mosberger'
38 "email": "contact@infinisil.com",
39 "github": "infinisil",
43 "fingerprint": "6C2B 55D4 4E04 8266 6B7D DA1A 422E 9EDA E015 7170"
46 "matrix": "@infinisil:matrix.org",
47 "name": "Silvan Mosberger",
52 The maintainer is designated by a `selector` which must be one of:
53 - `handle` (default): the maintainer's attribute name in `lib.maintainers`;
54 - `email`, `name`, `github`, `githubId`, `matrix`, `name`:
55 attributes of the maintainer's object, matched exactly;
56 see [`maintainer-list.nix`] for the fields' definition.
58 [`maintainer-list.nix`]: ../maintainer-list.nix
65 `sha-to-sri.py path ...` (atomically) rewrites hash attributes (named `hash` or `sha(1|256|512)`)
66 into the SRI format: `hash = "{hash name}-{base64 encoded value}"`.
68 `path` must point to either a nix file, or a directory which will be automatically traversed.
70 `sha-to-sri.py` automatically skips files whose first non-empty line contains `generated by` or `do not edit`.
71 Moreover, when walking a directory tree, the script will skip files whose name is `yarn.nix` or contains `generated`.