{ safeSeq, mkNop, ... }: { lib, ... }: with lib; { config.outputKinds = [ ( { hasSystem, ... }: optionalAttrs hasSystem { options = { checks = mkOption { type = with types; attrsOf anything; description = '' Evaluated by `nix flake check` NOTE: this is different from the flakes themselves -- this version accepts anything (not just a derivation): - for a derivation type, the behavior is unchanged - for a non-derivation type, expression gets shallow-evaluated instead ''; }; }; outputs = { lib, hasSystem, config, system, pkgs, ... }: lib.optionalAttrs hasSystem { checks.${system} = builtins.mapAttrs ( _: val: if val.type or "" == "derivation" then val else safeSeq val (mkNop pkgs) ) config.checks; }; } ) ]; }