Merge pull request #160453 from jtojnar/upd-nix-unstable-git

maintainers/scripts/update.nix: Fix deduplication for unstableGitUpdater
This commit is contained in:
José Romildo Malaquias 2022-10-22 23:16:29 -03:00 committed by GitHub
commit 1ab4b4a183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,17 @@ let
let
result = builtins.tryEval pathContent;
dedupResults = lst: nubOn ({ package, attrPath }: package.updateScript) (lib.concatLists lst);
somewhatUniqueRepresentant =
{ package, attrPath }: {
inherit (package) updateScript;
# Some updaters use the same `updateScript` value for all packages.
# Also compare `meta.description`.
position = package.meta.position or null;
# We cannot always use `meta.position` since it might not be available
# or it might be shared among multiple packages.
};
dedupResults = lst: nubOn somewhatUniqueRepresentant (lib.concatLists lst);
in
if result.success then
let