Return drvs directly from closure function
This commit is contained in:
parent
30caf6f8be
commit
1315e8fab8
10
flake.nix
10
flake.nix
|
@ -18,10 +18,10 @@
|
||||||
else []
|
else []
|
||||||
) attrs;
|
) attrs;
|
||||||
wrap = drv: { key = drv.outPath; inherit drv; };
|
wrap = drv: { key = drv.outPath; inherit drv; };
|
||||||
buildtimeDerivations = drv0: genericClosure {
|
buildtimeDerivations = drv0: map (obj: obj.drv) (genericClosure {
|
||||||
startSet = map wrap (drvOutputs drv0);
|
startSet = map wrap (drvOutputs drv0);
|
||||||
operator = obj: map wrap (concatLists (drvDeps obj.drv.drvAttrs));
|
operator = obj: map wrap (concatLists (drvDeps obj.drv.drvAttrs));
|
||||||
};
|
});
|
||||||
drvMaintainers = drv:
|
drvMaintainers = drv:
|
||||||
if ! hasAttr "meta" drv then []
|
if ! hasAttr "meta" drv then []
|
||||||
else if ! hasAttr "maintainers" drv.meta then []
|
else if ! hasAttr "maintainers" drv.meta then []
|
||||||
|
@ -36,8 +36,7 @@
|
||||||
bundlers."x86_64-linux" = with self.lib; rec {
|
bundlers."x86_64-linux" = with self.lib; rec {
|
||||||
default = adopt;
|
default = adopt;
|
||||||
maintainers = drv: let
|
maintainers = drv: let
|
||||||
deps = buildtimeDerivations drv;
|
drvs = buildtimeDerivations drv;
|
||||||
drvs = map (dep: dep.drv) deps;
|
|
||||||
maintainers = concatMap drvMaintainers drvs;
|
maintainers = concatMap drvMaintainers drvs;
|
||||||
maintainerNames = map maintainerToString maintainers;
|
maintainerNames = map maintainerToString maintainers;
|
||||||
maintainerNamesList = writeText "maintainers" (concatLines maintainerNames);
|
maintainerNamesList = writeText "maintainers" (concatLines maintainerNames);
|
||||||
|
@ -46,8 +45,7 @@
|
||||||
'';
|
'';
|
||||||
in uniqNames;
|
in uniqNames;
|
||||||
adopt = drv: let
|
adopt = drv: let
|
||||||
deps = buildtimeDerivations drv;
|
drvs = buildtimeDerivations drv;
|
||||||
drvs = map (dep: dep.drv) deps;
|
|
||||||
drvsNoMain = filter nobodyMaintains drvs;
|
drvsNoMain = filter nobodyMaintains drvs;
|
||||||
drvNames = map drvToString drvsNoMain;
|
drvNames = map drvToString drvsNoMain;
|
||||||
drvNamesList = writeText "no-maintainers" (concatLines drvNames);
|
drvNamesList = writeText "no-maintainers" (concatLines drvNames);
|
||||||
|
|
Loading…
Reference in New Issue