From 16cb9380f5927107a6397f9f9479fb82d84ef13a Mon Sep 17 00:00:00 2001 From: sheeaza Date: Fri, 15 Sep 2023 21:57:45 +0800 Subject: [PATCH] Update overrides.nix, compile leaderf vim plugin Leaderf is a vim fuzzy finder plugin, for details please see https://github.com/Yggdroot/LeaderF, and it supports c extension to speed up 10 times faster; The origin nixpkg does not compile the c extension, so compile the c extension to make it faster. 1. And also remove the build dir to prevent the unnecessary dependency on gcc. 2. strip the share lib to keep the files small Signed-off-by: sheeaza --- pkgs/applications/editors/vim/plugins/overrides.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix index cffecb7affad..501c957a1065 100644 --- a/pkgs/applications/editors/vim/plugins/overrides.nix +++ b/pkgs/applications/editors/vim/plugins/overrides.nix @@ -1629,6 +1629,17 @@ self: super: { --replace "'zoxide_executable', 'zoxide'" "'zoxide_executable', '${zoxide}/bin/zoxide'" ''; }; + LeaderF = super.LeaderF.overrideAttrs { + buildInputs = [ python3 ]; + # rm */build/ to prevent dependencies on gcc + # strip the *.so to keep files small + buildPhase = '' + patchShebangs . + ./install.sh + rm autoload/leaderf/fuzzyMatch_C/build/ -r + ''; + stripDebugList = [ "autoload/leaderf/python" ]; + }; } // ( let