Unverified Commit ed85bb43 authored by Austin Horstman's avatar Austin Horstman
Browse files

vimPlugins.sqlite-lua: remove redundant definition

We currently declare the same path a couple times in this small
definition, re-use the variable for both scopes.
parent 20c46323
Loading
Loading
Loading
Loading
+13 −11
Original line number Diff line number Diff line
@@ -2008,21 +2008,23 @@ in
    meta.homepage = "https://github.com/ackyshake/Spacegray.vim/";
  };

  sqlite-lua = super.sqlite-lua.overrideAttrs (oa: {
    postPatch =
  sqlite-lua = super.sqlite-lua.overrideAttrs (
    oa:
    let
      libsqlite = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}";
    in
      ''
    {
      postPatch = ''
        substituteInPlace lua/sqlite/defs.lua \
          --replace-fail "path = vim.g.sqlite_clib_path" "path = vim.g.sqlite_clib_path or '${lib.escapeShellArg libsqlite}'"
      '';

      passthru = oa.passthru // {
      initLua = ''vim.g.sqlite_clib_path = "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}"'';
        initLua = ''vim.g.sqlite_clib_path = "${libsqlite}"'';
      };
      nvimRequireCheck = "sqlite";
  });
    }
  );

  ssr = super.ssr-nvim.overrideAttrs {
    dependencies = with self; [ nvim-treesitter ];