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