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
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
genericClosure
|
genericClosure
|
||||||
|
@ -14,6 +11,7 @@ let
|
||||||
concatLines
|
concatLines
|
||||||
concatLists
|
concatLists
|
||||||
concatMap
|
concatMap
|
||||||
|
concatStringsSep
|
||||||
filter
|
filter
|
||||||
isDerivation
|
isDerivation
|
||||||
isList
|
isList
|
||||||
|
@ -45,14 +43,8 @@ rec {
|
||||||
startSet = map wrap (drvOutputs drv);
|
startSet = map wrap (drvOutputs drv);
|
||||||
operator = obj: map wrap (concatLists (drvDeps obj.drv.drvAttrs));
|
operator = obj: map wrap (concatLists (drvDeps obj.drv.drvAttrs));
|
||||||
});
|
});
|
||||||
drvMaintainers =
|
maintainable = drv: hasAttr "meta" drv && hasAttr "maintainers" drv.meta;
|
||||||
drv:
|
drvMaintainers = drv: if maintainable drv then drv.meta.maintainers else [ ];
|
||||||
if !hasAttr "meta" drv then
|
|
||||||
[ ]
|
|
||||||
else if !hasAttr "maintainers" drv.meta then
|
|
||||||
[ ]
|
|
||||||
else
|
|
||||||
drv.meta.maintainers;
|
|
||||||
nobodyMaintains =
|
nobodyMaintains =
|
||||||
drv: hasAttr "meta" drv && hasAttr "maintainers" drv.meta && (length drv.meta.maintainers) == 0;
|
drv: hasAttr "meta" drv && hasAttr "maintainers" drv.meta && (length drv.meta.maintainers) == 0;
|
||||||
stringJoin = objToString: objs: writeText "txt" (concatLines (map objToString objs));
|
stringJoin = objToString: objs: writeText "txt" (concatLines (map objToString objs));
|
||||||
|
@ -82,4 +74,19 @@ rec {
|
||||||
| ${pkgs.unixtools.column}/bin/column -t \
|
| ${pkgs.unixtools.column}/bin/column -t \
|
||||||
> $out
|
> $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
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
default = adopt;
|
default = adopt;
|
||||||
maintainers = lib.allMaintainers;
|
maintainers = lib.allMaintainers;
|
||||||
adopt = lib.noMaintainers;
|
adopt = lib.noMaintainers;
|
||||||
|
list = lib.listMaintainers;
|
||||||
};
|
};
|
||||||
|
|
||||||
formatter."x86_64-linux" = pkgs.nixfmt-rfc-style;
|
formatter."x86_64-linux" = pkgs.nixfmt-rfc-style;
|
||||||
|
|
Loading…
Reference in New Issue