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, ... }:
|
{ nixpkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) any filter;
|
inherit (builtins) elem filter;
|
||||||
inherit (nixpkgs.lib.strings) getName;
|
inherit (nixpkgs.lib.strings) getName;
|
||||||
in {
|
in {
|
||||||
remove = nameList: pkgList:
|
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