···110 hasUnfreeLicense = attrs: hasLicense attrs && isUnfree attrs.meta.license;
111112 hasNoMaintainers =
113+ # To get usable output, we want to avoid flagging "internal" derivations.
114+ # Because we do not have a way to reliably decide between internal or
115+ # external derivation, some heuristics are required to decide.
116+ #
117+ # If `outputHash` is defined, the derivation is a FOD, such as the output of a fetcher.
118+ # If `description` is not defined, the derivation is probably not a package.
119+ # Simply checking whether `meta` is defined is insufficient,
120+ # as some fetchers and trivial builders do define meta.
121 attrs:
122+ (!attrs ? outputHash)
123+ && (attrs ? meta.description)
124+ && (attrs.meta.maintainers or [ ] == [ ])
125+ && (attrs.meta.teams or [ ] == [ ]);
126127 isMarkedBroken = attrs: attrs.meta.broken or false;
128