From 3f276c26afe1c097109bcf88ae655c6e5907e3a3 Mon Sep 17 00:00:00 2001 From: Mikael Voss Date: Sat, 24 Aug 2024 13:11:21 +0200 Subject: [PATCH] lib: Add auxiliary function to deal with packages --- lib/packages.nix | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 lib/packages.nix diff --git a/lib/packages.nix b/lib/packages.nix new file mode 100644 index 0000000..56c94a5 --- /dev/null +++ b/lib/packages.nix @@ -0,0 +1,9 @@ +{ nixpkgs, ... }: + +let + inherit (builtins) any filter; + inherit (nixpkgs.lib.strings) getName; +in { + remove = nameList: pkgList: + filter (pkg: !any (elem: getName pkg == elem) nameList) pkgList; +}