Add bundlers.list
This commit is contained in:
parent
2c1b4de20f
commit
aae8892a4a
31
default.nix
31
default.nix
@ -1,7 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (builtins)
|
||||
genericClosure
|
||||
@ -14,6 +11,7 @@ let
|
||||
concatLines
|
||||
concatLists
|
||||
concatMap
|
||||
concatStringsSep
|
||||
filter
|
||||
isDerivation
|
||||
isList
|
||||
@ -45,14 +43,8 @@ rec {
|
||||
startSet = map wrap (drvOutputs drv);
|
||||
operator = obj: map wrap (concatLists (drvDeps obj.drv.drvAttrs));
|
||||
});
|
||||
drvMaintainers =
|
||||
drv:
|
||||
if !hasAttr "meta" drv then
|
||||
[ ]
|
||||
else if !hasAttr "maintainers" drv.meta then
|
||||
[ ]
|
||||
else
|
||||
drv.meta.maintainers;
|
||||
maintainable = drv: hasAttr "meta" drv && hasAttr "maintainers" drv.meta;
|
||||
drvMaintainers = drv: if maintainable drv then drv.meta.maintainers else [ ];
|
||||
nobodyMaintains =
|
||||
drv: hasAttr "meta" drv && hasAttr "maintainers" drv.meta && (length drv.meta.maintainers) == 0;
|
||||
stringJoin = objToString: objs: writeText "txt" (concatLines (map objToString objs));
|
||||
@ -82,4 +74,19 @@ rec {
|
||||
| ${pkgs.unixtools.column}/bin/column -t \
|
||||
> $out
|
||||
'';
|
||||
|
||||
listMaintainers =
|
||||
drv:
|
||||
let
|
||||
closure = drvClosure drv;
|
||||
maintainableDrvs = filter maintainable closure;
|
||||
maintainersToString =
|
||||
maintainers: concatStringsSep "," (map (main: toString main.github) maintainers);
|
||||
drvToString = drv: "${drv.name} ${maintainersToString (drvMaintainers drv)}";
|
||||
in
|
||||
runCommandLocal "maintainers.txt" { } ''
|
||||
<${stringJoin drvToString maintainableDrvs} sort -u \
|
||||
| ${pkgs.unixtools.column}/bin/column -t \
|
||||
> $out
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user