@ -50,6 +50,9 @@ let
hasLicense attrs &&
hasLicense attrs &&
isUnfree ( lib . lists . toList attrs . meta . license ) ;
isUnfree ( lib . lists . toList attrs . meta . license ) ;
hasNoMaintainers = attrs :
attrs ? meta . maintainers && ( lib . length attrs . meta . maintainers ) == 0 ;
isMarkedBroken = attrs : attrs . meta . broken or false ;
isMarkedBroken = attrs : attrs . meta . broken or false ;
hasUnsupportedPlatform = attrs :
hasUnsupportedPlatform = attrs :
@ -95,6 +98,7 @@ let
insecure = remediate_insecure ;
insecure = remediate_insecure ;
broken-outputs = remediateOutputsToInstall ;
broken-outputs = remediateOutputsToInstall ;
unknown-meta = x : " " ;
unknown-meta = x : " " ;
maintainerless = x : " " ;
} ;
} ;
remediation_env_var = allow_attr : {
remediation_env_var = allow_attr : {
Unfree = " N I X P K G S _ A L L O W _ U N F R E E " ;
Unfree = " N I X P K G S _ A L L O W _ U N F R E E " ;
@ -302,6 +306,11 @@ let
{ valid = " n o " ; reason = " b r o k e n - o u t p u t s " ; errormsg = " h a s i n v a l i d m e t a . o u t p u t s T o I n s t a l l " ; }
{ valid = " n o " ; reason = " b r o k e n - o u t p u t s " ; errormsg = " h a s i n v a l i d m e t a . o u t p u t s T o I n s t a l l " ; }
else let res = checkMeta ( attrs . meta or { } ) ; in if res != [ ] then
else let res = checkMeta ( attrs . meta or { } ) ; in if res != [ ] then
{ valid = " n o " ; reason = " u n k n o w n - m e t a " ; errormsg = " h a s a n i n v a l i d m e t a a t t r s e t : ${ lib . concatMapStrings ( x : " \n \t - " + x ) res } " ; }
{ valid = " n o " ; reason = " u n k n o w n - m e t a " ; errormsg = " h a s a n i n v a l i d m e t a a t t r s e t : ${ lib . concatMapStrings ( x : " \n \t - " + x ) res } " ; }
# --- warnings ---
# Please also update the type in /pkgs/top-level/config.nix alongside this.
else if hasNoMaintainers attrs then
{ valid = " w a r n " ; reason = " m a i n t a i n e r l e s s " ; errormsg = " h a s n o m a i n t a i n e r s " ; }
# -----
else { valid = " y e s " ; } ) ;
else { valid = " y e s " ; } ) ;
assertValidity = { meta , attrs }: let
assertValidity = { meta , attrs }: let