anchor.diff:        { valid = false; reason = "unsupported"; errormsg = "is not supported on ‘${hostPlatform.config}’"; }
       else if !(hasAllowedInsecure attrs) then
         { valid = false; reason = "insecure"; errormsg = "is marked as insecure"; }
  +    else if checkOutputsToInstall attrs then
  +      { valid = false; reason = "broken-outputs"; errormsg = "has invalid meta.outputsToInstall"; }
       else let res = checkMeta (attrs.meta or {}); in if res != [] then
         { valid = false; reason = "unknown-meta"; errormsg = "has an invalid meta attrset:${lib.concatMapStrings (x: "\n\t - " + x) res}"; }
       else { valid = true; };
  
positive.code:              }
  
        '';
  
    handleEvalIssue = attrs: { reason , errormsg ? "" }:
      let
  
negative.code:     in  anyMatch (attrs.meta.platforms or lib.platforms.all) &&
        ! anyMatch (attrs.meta.badPlatforms or []);
  
    checkOutputsToInstall = attrs: let
        expectedOutputs = attrs.meta.outputsToInstall or [];
        actualOutputs = attrs.outputs or [ "out" ];
        missingOutputs = builtins.filter (output: ! builtins.elem output actualOutputs) expectedOutputs;
      in if shouldCheckMeta
         then builtins.length missingOutputs > 0
         else false;
  
    # Check if a derivation is valid, that is whether it passes checks for
    # e.g brokenness or license.
    #
  