From 2749f3be5ad09d06dc472976d9e85e168022e718 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sun, 12 Jan 2025 16:02:10 -0600 Subject: [PATCH] vimPlugins.moveline-nvim: fix darwin support --- .../non-generated/moveline-nvim/default.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/non-generated/moveline-nvim/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/moveline-nvim/default.nix index d388bba794a6..b1220a1da25b 100644 --- a/pkgs/applications/editors/vim/plugins/non-generated/moveline-nvim/default.nix +++ b/pkgs/applications/editors/vim/plugins/non-generated/moveline-nvim/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, rustPlatform, vimUtils, + stdenv, }: let version = "0.3.1-unstable-2023-07-06"; @@ -30,11 +31,18 @@ vimUtils.buildVimPlugin { inherit src version; pname = "moveline-nvim"; - preInstall = '' - mkdir -p lua - ln -s ${moveline-lib}/lib/libmoveline.so lua/moveline.so - ''; + preInstall = + # https://github.com/neovim/neovim/issues/21749 + # Need to still copy generated library as `so` because neovim doesn't check for `dylib` + let + ext = stdenv.hostPlatform.extensions.sharedLibrary; + in + '' + mkdir -p lua + ln -s ${moveline-lib}/lib/libmoveline${ext} lua/moveline.so + ''; + # Plugin generates a non lua file output that needs to be manually required nvimRequireCheck = "moveline"; meta = { @@ -42,8 +50,5 @@ vimUtils.buildVimPlugin { homepage = "https://github.com/willothy/moveline.nvim"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ redxtech ]; - badPlatforms = [ - lib.systems.inspect.patterns.isDarwin - ]; }; }