Convert maintainer file entries to attributes, add github handles
Based on https://github.com/NixOS/nixpkgs/pull/34842, the nix-instantiate output was pretty-printed and the validity of the github handles manually verified, by automatically checking whether the user handles exist on github (https://github.com/userhandle, status 200 or 404). Each handle under 5 characters was manually checked (because the collision probability with non-maintainer accounts is high), each missing entry was manually researched. The script used is kept in `maintainers/scripts` as an example of how to work with the mainainers list through nix’ JSON interface.
This commit is contained in:
parent
cf1b51aba2
commit
aa47bac04f
@ -21,7 +21,7 @@ let
|
|||||||
|
|
||||||
# packaging
|
# packaging
|
||||||
customisation = callLibs ./customisation.nix;
|
customisation = callLibs ./customisation.nix;
|
||||||
maintainers = callLibs ./maintainers.nix;
|
maintainers = import ./maintainers.nix;
|
||||||
meta = callLibs ./meta.nix;
|
meta = callLibs ./meta.nix;
|
||||||
sources = callLibs ./sources.nix;
|
sources = callLibs ./sources.nix;
|
||||||
|
|
||||||
|
4745
lib/maintainers.nix
4745
lib/maintainers.nix
File diff suppressed because it is too large
Load Diff
23
maintainers/scripts/check-maintainer-github-handles.sh
Executable file
23
maintainers/scripts/check-maintainer-github-handles.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p jq parallel
|
||||||
|
|
||||||
|
# Example how to work with the `lib.maintainers` attrset.
|
||||||
|
# Can be used to check whether all user handles are still valid.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# checks whether a user handle can be found on github
|
||||||
|
function checkUser {
|
||||||
|
local user="$1"
|
||||||
|
local status=
|
||||||
|
status="$(curl --silent --head "https://github.com/${user}" | grep Status)"
|
||||||
|
printf "%s\t\t\t\t%s\n" "$status" "$user"
|
||||||
|
}
|
||||||
|
export -f checkUser
|
||||||
|
|
||||||
|
# output the maintainers set as json
|
||||||
|
# and filter out the github username of each maintainer (if it exists)
|
||||||
|
# then check 100 at the same time
|
||||||
|
nix-instantiate -A lib.maintainers --eval --strict --json \
|
||||||
|
| jq -r '.[]|.github' \
|
||||||
|
| parallel -j100 checkUser
|
Loading…
Reference in New Issue
Block a user