check-meta: filter nulls out of {maintainers,teams}Position
Note that Nix checks for this when it's querying meta: https://github.com/NixOS/nix/blob/2.18.8/src/nix-env/nix-env.cc#L963
This commit is contained in:
@@ -26,6 +26,7 @@ let
|
||||
isAttrs
|
||||
isString
|
||||
mapAttrs
|
||||
filterAttrs
|
||||
;
|
||||
|
||||
inherit (lib.lists)
|
||||
@@ -593,11 +594,12 @@ let
|
||||
)
|
||||
] ++ optional (hasOutput "man") "man";
|
||||
}
|
||||
// {
|
||||
# CI scripts look at these to determine pings.
|
||||
// (filterAttrs (_: v: v != null) {
|
||||
# CI scripts look at these to determine pings. Note that we should filter nulls out of this,
|
||||
# or nix-env complains: https://github.com/NixOS/nix/blob/2.18.8/src/nix-env/nix-env.cc#L963
|
||||
maintainersPosition = builtins.unsafeGetAttrPos "maintainers" (attrs.meta or { });
|
||||
teamsPosition = builtins.unsafeGetAttrPos "teams" (attrs.meta or { });
|
||||
}
|
||||
})
|
||||
// attrs.meta or { }
|
||||
# Fill `meta.position` to identify the source location of the package.
|
||||
// optionalAttrs (pos != null) {
|
||||
|
||||
Reference in New Issue
Block a user