about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorGaetan Lepage <gaetan@glepage.com>2024-06-21 15:02:14 +0200
committerGaetan Lepage <gaetan@glepage.com>2024-06-21 15:03:23 +0200
commit460573f7332b88a88950fe6d29665cdffc8be5a8 (patch)
treedda0471c26e834b41a2fb630a32f524dd868d098 /pkgs/applications/editors
parentc380d4f0612f594588ed9f73606063e24ed06d9e (diff)
vimPlugins.codesnap-nvim: fix binary substitution
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/vim/plugins/overrides.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/applications/editors/vim/plugins/overrides.nix b/pkgs/applications/editors/vim/plugins/overrides.nix
index 2b2f69fa0078b..dc7fe9b2303d1 100644
--- a/pkgs/applications/editors/vim/plugins/overrides.nix
+++ b/pkgs/applications/editors/vim/plugins/overrides.nix
@@ -436,11 +436,15 @@
       pname = "codesnap.nvim";
       inherit version src;
 
+      # - Remove the shipped pre-built binaries
+      # - Copy the resulting binary from the codesnap-lib derivation
+      # Note: the destination should be generator.so, even on darwin
       # https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh
       postInstall = let
         extension = if stdenv.isDarwin then "dylib" else "so";
       in ''
-        cp ${codesnap-lib}/lib/libgenerator.${extension} lua/generator.so
+        rm -r $out/lua/*.so
+        cp ${codesnap-lib}/lib/libgenerator.${extension} $out/lua/generator.so
       '';
 
       doInstallCheck = true;