From 9f888282845c431fa7d21cf2f6d8deca5b793ec5 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sat, 24 Aug 2024 14:00:52 +0200 Subject: [PATCH] lib/packages: Simplify remove function --- lib/packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/packages.nix b/lib/packages.nix index 56c94a5..e13f9da 100644 --- a/lib/packages.nix +++ b/lib/packages.nix @@ -1,9 +1,9 @@ { nixpkgs, ... }: let - inherit (builtins) any filter; + inherit (builtins) elem filter; inherit (nixpkgs.lib.strings) getName; in { remove = nameList: pkgList: - filter (pkg: !any (elem: getName pkg == elem) nameList) pkgList; + filter (pkg: !elem (getName pkg) nameList) pkgList; }