aboutsummaryrefslogtreecommitdiff
path: root/maintainers/scripts/update.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2018-02-26 06:08:55 +0100
committerJan Tojnar <jtojnar@gmail.com>2018-03-01 02:53:00 +0100
commitf929f38d5e9e5d2ed7bc0c21e7336de85246c84b (patch)
treea6c1f9fb96f3e8ce060749be80c7916eff59b01e /maintainers/scripts/update.nix
parent4145f5e3b0effac8f2593f744626e9db28792fd5 (diff)
maintainers/scripts/update.nix: deduplicate packages
Lot of my GNOME packages have several legacy aliases, which causes them to be updated multiple times. This patch uses lib.unique to remove the duplicates.
Diffstat (limited to 'maintainers/scripts/update.nix')
-rwxr-xr-xmaintainers/scripts/update.nix30
1 files changed, 16 insertions, 14 deletions
diff --git a/maintainers/scripts/update.nix b/maintainers/scripts/update.nix
index 2035950da3e..2c9c0b3bf45 100755
--- a/maintainers/scripts/update.nix
+++ b/maintainers/scripts/update.nix
@@ -9,22 +9,24 @@ let
pkgs = import ./../../default.nix { };
packagesWith = cond: return: set:
- pkgs.lib.flatten
- (pkgs.lib.mapAttrsToList
- (name: pkg:
- let
- result = builtins.tryEval (
- if pkgs.lib.isDerivation pkg && cond name pkg
- then [(return name pkg)]
- else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false
- then packagesWith cond return pkg
+ pkgs.lib.unique
+ (pkgs.lib.flatten
+ (pkgs.lib.mapAttrsToList
+ (name: pkg:
+ let
+ result = builtins.tryEval (
+ if pkgs.lib.isDerivation pkg && cond name pkg
+ then [(return name pkg)]
+ else if pkg.recurseForDerivations or false || pkg.recurseForRelease or false
+ then packagesWith cond return pkg
+ else []
+ );
+ in
+ if result.success then result.value
else []
- );
- in
- if result.success then result.value
- else []
+ )
+ set
)
- set
);
packagesWithUpdateScriptAndMaintainer = maintainer':