lib/packages: Simplify remove function
This commit is contained in:
parent
10013701bc
commit
9f88828284
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue