Fix nobodyMaintains check

This commit is contained in:
Tim Van Baak 2024-07-08 09:39:03 -07:00
parent 76af140204
commit 30caf6f8be
1 changed files with 4 additions and 4 deletions

View File

@ -27,9 +27,9 @@
else if ! hasAttr "maintainers" drv.meta then [] else if ! hasAttr "maintainers" drv.meta then []
else drv.meta.maintainers; else drv.meta.maintainers;
nobodyMaintains = drv: nobodyMaintains = drv:
if ! hasAttr "meta" drv then true hasAttr "meta" drv &&
else if ! hasAttr "maintainers" drv.meta then true hasAttr "maintainers" drv.meta &&
else (length drv.meta.maintainers) == 0; (length drv.meta.maintainers) == 0;
maintainerToString = m: "${m.name} (${m.email})"; maintainerToString = m: "${m.name} (${m.email})";
drvToString = drv: "${drv.name}"; drvToString = drv: "${drv.name}";
}; };
@ -52,7 +52,7 @@
drvNames = map drvToString drvsNoMain; drvNames = map drvToString drvsNoMain;
drvNamesList = writeText "no-maintainers" (concatLines drvNames); drvNamesList = writeText "no-maintainers" (concatLines drvNames);
uniqNames = runCommandLocal "no-maintainers.txt" {} '' uniqNames = runCommandLocal "no-maintainers.txt" {} ''
<${drvNamesList} sort | uniq -c > $out <${drvNamesList} sort -u > $out
''; '';
in uniqNames; in uniqNames;
}; };