mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
Merge pull request #213473 from cdepillabout/ignore-emailless-maint
haskellPackages: ignore maintainers without email
This commit is contained in:
commit
d9a9c95797
@ -1,7 +1,21 @@
|
||||
# Nix script to lookup maintainer github handles from their email address. Used by ./hydra-report.hs.
|
||||
#
|
||||
# This script produces an attr set mapping of email addresses to GitHub handles:
|
||||
#
|
||||
# ```nix
|
||||
# > import ./maintainer-handles.nix
|
||||
# { "cdep.illabout@gmail.com" = "cdepillabout"; "john@smith.com" = "johnsmith"; ... }
|
||||
# ```
|
||||
#
|
||||
# This mapping contains all maintainers in ../../mainatainer-list.nix, but it
|
||||
# ignores maintainers who don't have a GitHub account or an email address.
|
||||
let
|
||||
pkgs = import ../../.. {};
|
||||
maintainers = import ../../maintainer-list.nix;
|
||||
inherit (pkgs) lib;
|
||||
mkMailGithubPair = _: maintainer: if maintainer ? github then { "${maintainer.email}" = maintainer.github; } else {};
|
||||
mkMailGithubPair = _: maintainer:
|
||||
if (maintainer ? email) && (maintainer ? github) then
|
||||
{ "${maintainer.email}" = maintainer.github; }
|
||||
else
|
||||
{};
|
||||
in lib.zipAttrsWith (_: builtins.head) (lib.mapAttrsToList mkMailGithubPair maintainers)
|
||||
|
Loading…
Reference in New Issue
Block a user