From 84305d33fdcc5f456869f0abf4de67e7cc759d25 Mon Sep 17 00:00:00 2001 From: LeMarsu Date: Fri, 17 Apr 2026 15:51:11 +0200 Subject: [PATCH] fix: no more calling deprecated function `makeNeovimConfig` --- lib/modules/default.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/modules/default.nix b/lib/modules/default.nix index 6ab0267..660c7ac 100644 --- a/lib/modules/default.nix +++ b/lib/modules/default.nix @@ -50,18 +50,34 @@ in { ... }: let pkg = pkgs.wrapNeovimUnstable config.package config.neovimOptions; + luaRcContent = config.init.finalContent; + inherit (config) extraLuaPackages; + neovim-unwrapped = config.package; + inherit (neovim-unwrapped.lua.pkgs.luaLib) genLuaPathAbsStr genLuaCPathAbsStr; + luaEnv = neovim-unwrapped.lua.withPackages extraLuaPackages; - neovimOptions = pkgs.neovimUtils.makeNeovimConfig rec { - inherit (config) extraLuaPackages viAlias vimAlias; + neovimOptions = { + inherit extraLuaPackages luaRcContent; + inherit (config) viAlias vimAlias; - customLuaRC = config.init.finalContent; - wrapRc = customLuaRC != null; + wrapRc = luaRcContent != null; plugins = concatLists [ (map modules.plugin.extract config.plugins) (optional (! isNull config.runtime) config.runtime.package) [config.slothPlugin] ]; + + wrapperArgs = lib.optionals (luaEnv != null) [ + "--prefix" + "LUA_PATH" + ";" + (genLuaPathAbsStr luaEnv) + "--prefix" + "LUA_CPATH" + ";" + (genLuaCPathAbsStr luaEnv) + ]; }; neovimPackage = pkg.overrideAttrs (final: super: {