Unverified Commit c7dcba88 authored by Morgan Jones's avatar Morgan Jones
Browse files

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
parent 16762245
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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) {