diff options
| author | Matthieu C. <886074+teto@users.noreply.github.com> | 2024-05-29 23:59:55 +0200 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2024-05-30 13:12:45 +0000 |
| commit | 88f31dcaa442e6c034d47a293195f98321cdd757 (patch) | |
| tree | 2691c632d23a60c5183c1cb3a0f2f7d73ef640de | |
| parent | luaPackages.toml: remove debug leftover (diff) | |
| download | nixpkgs-origin/backport-315732-to-release-24.05.tar.gz | |
luaPackages.sqlite: make it work out of the boxorigin/backport-315732-to-release-24.05
the tests worked because we exported LIBSQLITE. the user had to either set LIBSQLITE himself or set vim.g.sqlite_clib_path. This change overrides vim.g.sqlite_clib_path
(cherry picked from commit 33aa75a8c54c22a2866b1b46881a556a59e10777)
| -rw-r--r-- | pkgs/development/lua-modules/overrides.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkgs/development/lua-modules/overrides.nix b/pkgs/development/lua-modules/overrides.nix index 177ba7738f50..b3c35ea20254 100644 --- a/pkgs/development/lua-modules/overrides.nix +++ b/pkgs/development/lua-modules/overrides.nix @@ -678,9 +678,15 @@ in doCheck = true; nativeCheckInputs = [ final.plenary-nvim neovim-unwrapped ]; + # the plugin loads the library from either the LIBSQLITE env + # or the vim.g.sqlite_clib_path variable. + postPatch = '' + substituteInPlace lua/sqlite/defs.lua \ + --replace-fail "path = vim.g.sqlite_clib_path" 'path = vim.g.sqlite_clib_path or "${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}"' + ''; + # we override 'luarocks test' because otherwise neovim doesn't find/load the plenary plugin checkPhase = '' - export LIBSQLITE="${sqlite.out}/lib/libsqlite3${stdenv.hostPlatform.extensions.sharedLibrary}" export HOME="$TMPDIR"; nvim --headless -i NONE \ |
