Merge pull request #107014 from jtojnar/update-script-no-lists
maintainers/scripts/update.nix: Do not traverse lists
This commit is contained in:
commit
31ded1888e
|
@ -34,7 +34,7 @@ let
|
||||||
|
|
||||||
/* Recursively find all packages (derivations) in `pkgs` matching `cond` predicate.
|
/* Recursively find all packages (derivations) in `pkgs` matching `cond` predicate.
|
||||||
|
|
||||||
Type: packagesWithPath :: AttrPath → (AttrPath → derivation → bool) → (AttrSet | List) → List<AttrSet{attrPath :: str; package :: derivation; }>
|
Type: packagesWithPath :: AttrPath → (AttrPath → derivation → bool) → AttrSet → List<AttrSet{attrPath :: str; package :: derivation; }>
|
||||||
AttrPath :: [str]
|
AttrPath :: [str]
|
||||||
|
|
||||||
The packages will be returned as a list of named pairs comprising of:
|
The packages will be returned as a list of named pairs comprising of:
|
||||||
|
@ -60,8 +60,6 @@ let
|
||||||
if path == rootPath || evaluatedPathContent.recurseForDerivations or false || evaluatedPathContent.recurseForRelease or false then
|
if path == rootPath || evaluatedPathContent.recurseForDerivations or false || evaluatedPathContent.recurseForRelease or false then
|
||||||
dedupResults (lib.mapAttrsToList (name: elem: packagesWithPathInner (path ++ [name]) elem) evaluatedPathContent)
|
dedupResults (lib.mapAttrsToList (name: elem: packagesWithPathInner (path ++ [name]) elem) evaluatedPathContent)
|
||||||
else []
|
else []
|
||||||
else if lib.isList evaluatedPathContent then
|
|
||||||
dedupResults (lib.imap0 (i: elem: packagesWithPathInner (path ++ [i]) elem) evaluatedPathContent)
|
|
||||||
else []
|
else []
|
||||||
else [];
|
else [];
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue