vimPlugins.sqlite-lua: fix postPatch substituting nonexistent file

This commit also fixes the logic to use the appropriate dynamic
library according to the platform (.dylib for Darwin otherwise .so).
main
Nicolas Berbiche 3 years ago
parent 2444c11431
commit 2f73bd77ed
No known key found for this signature in database
GPG Key ID: FA5696EDF35DA0B6
  1. 6
      pkgs/misc/vim-plugins/overrides.nix

@ -480,9 +480,11 @@ self: super: {
});
sqlite-lua = super.sqlite-lua.overrideAttrs (old: {
postPatch = ''
postPatch = let
libsqlite = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}";
in ''
substituteInPlace lua/sqlite/defs.lua \
--replace "vim.g.sqlite_clib_path" "vim.g.sqlite_clib_path or '${sqlite.out}/lib/libsqlite3.so'"
--replace "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or ${lib.escapeShellArg libsqlite}"
'';
});

Loading…
Cancel
Save