Extend by many more functions from "pkgs.*"

Recursively  by all functions in:

- elmPackages
- agdaPackages
- dhallPackages
- beamPackages
- dotnetCorePackages
- emacsPackages
- gradle-packages
- ociTools
- releaseTools
- snapTools
- vmTools
This commit is contained in:
Johannes Kirschbauer 2024-01-21 17:24:48 +01:00 committed by Johannes Kirschbauer
parent 5d88cb1482
commit adc56898d3
2 changed files with 18 additions and 2 deletions

View File

@ -27,6 +27,22 @@ let
initialPath = [ "pkgs" "rustPackages" ];
};
appimageTools = collectFns pkgs.appimageTools { initialPath = [ "pkgs" "appimageTools" ]; };
elmPackages = collectFns pkgs.elmPackages { initialPath = [ "pkgs" "elmPackages" ]; };
agdaPackages = collectFns pkgs.agdaPackages { initialPath = [ "pkgs" "agdaPackages" ]; ignores = [ "lib" ]; };
dhallPackages = collectFns pkgs.dhallPackages { initialPath = [ "pkgs" "dhallPackages" ]; ignores = [ "lib" ]; };
beamPackages = collectFns pkgs.beamPackages { initialPath = [ "pkgs" "beamPackages" ]; };
dotnetCorePackages = collectFns pkgs.dotnetCorePackages { initialPath = [ "pkgs" "dotnetCorePackages" ]; };
emacsPackages = collectFns pkgs.emacsPackages { initialPath = [ "pkgs" "emacsPackages" ]; };
gradle-packages = collectFns pkgs.gradle-packages { initialPath = [ "pkgs" "gradle-packages" ]; };
ociTools = collectFns pkgs.ociTools { initialPath = [ "pkgs" "ociTools" ]; };
releaseTools = collectFns pkgs.releaseTools { initialPath = [ "pkgs" "releaseTools" ]; };
snapTools = collectFns pkgs.snapTools { initialPath = [ "pkgs" "snapTools" ]; };
vmTools = collectFns pkgs.vmTools { initialPath = [ "pkgs" "vmTools" ]; };
############# Non-recursive analysis sets (pkgs.<nested>)
# pkgs cannot be analysed recursively

View File

@ -50,7 +50,7 @@ let
]
*/
collectFns = set:
{ initialPath ? [ ], limit ? null, }:
{ initialPath ? [ ], limit ? null, ignores ? [ ] }:
let
filterFns = builtins.filter (item:
item.docs != null &&
@ -94,7 +94,7 @@ let
path = lib.unique (item.key ++ [ name ]);
in
if lib.isDerivation nextVal || name == "__functor"
|| (limit != null && item.depth >= limit) then
|| (limit != null && item.depth >= limit) || (builtins.any (n: n == name) ignores) then
# skipping all more nested values by
# returning the previous item
item