From 72a11168125cf54a03f44fe03c79f7f1ab9a09c6 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Tue, 25 Mar 2025 17:47:19 +0000 Subject: [PATCH] vimPlugins: simplify auto-non-generated using `lib.pipe` --- pkgs/applications/editors/vim/plugins/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/default.nix b/pkgs/applications/editors/vim/plugins/default.nix index 89bd49f36cc0..729129901315 100644 --- a/pkgs/applications/editors/vim/plugins/default.nix +++ b/pkgs/applications/editors/vim/plugins/default.nix @@ -33,9 +33,15 @@ let nonGeneratedPlugins = self: super: - lib.mapAttrs (name: _: callPackage (./non-generated + "/${name}") { }) ( - lib.filterAttrs (name: type: type == "directory") (builtins.readDir ./non-generated) - ); + let + root = ./non-generated; + call = name: callPackage (root + "/${name}") { }; + in + lib.pipe root [ + builtins.readDir + (lib.filterAttrs (_: type: type == "directory")) + (builtins.mapAttrs (name: _: call name)) + ]; plugins = callPackage ./generated.nix { inherit buildVimPlugin;