modules/output: drop deprecated makeNeovimConfig
nixpkgs deprecated neovimUtils.makeNeovimConfig in favor of wrapNeovimUnstable. Keep Nixvim's current generated init.lua startup model, but stop routing wrapper construction through the deprecated helper. Switch modules/top-level/output.nix to call wrapNeovimUnstable directly and preserve the existing wrappedNeovim.initRc -> generated init.lua composition. This aligns Nixvim with the upstream wrapper API change without changing our current bootstrap behavior yet. Also update CONTRIBUTING to point contributors at wrapNeovimUnstable instead of the deprecated helper.
This commit is contained in:
parent
2b9f8e1d65
commit
f6f985ce53
2 changed files with 24 additions and 27 deletions
|
|
@ -7,7 +7,7 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) types mkOption mkPackageOption;
|
||||
inherit (lib) optional optionalAttrs;
|
||||
inherit (lib) optional;
|
||||
builders = lib.nixvim.builders.withPkgs pkgs;
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
in
|
||||
|
|
@ -199,8 +199,10 @@ in
|
|||
else
|
||||
config.extraLuaPackages;
|
||||
|
||||
neovimConfig = pkgs.neovimUtils.makeNeovimConfig (
|
||||
{
|
||||
luaEnv = package.lua.withPackages extraLuaPackages;
|
||||
|
||||
wrappedNeovim =
|
||||
(pkgs.wrapNeovimUnstable package {
|
||||
inherit extraLuaPackages;
|
||||
inherit (config)
|
||||
extraPython3Packages
|
||||
|
|
@ -212,29 +214,25 @@ in
|
|||
withPerl
|
||||
withPython3
|
||||
;
|
||||
# inherit customRC;
|
||||
inherit (config.build) plugins;
|
||||
}
|
||||
# Necessary to make sure the runtime path is set properly in NixOS 22.05,
|
||||
# or more generally before the commit:
|
||||
# cda1f8ae468 - neovim: pass packpath via the wrapper
|
||||
// optionalAttrs (lib.functionArgs pkgs.neovimUtils.makeNeovimConfig ? configure) {
|
||||
configure.packages = {
|
||||
nixvim = {
|
||||
start = map (x: x.plugin) config.build.plugins;
|
||||
opt = [ ];
|
||||
};
|
||||
wrapperArgs = lib.optionals (luaEnv != null) [
|
||||
"--prefix"
|
||||
"LUA_PATH"
|
||||
";"
|
||||
(package.lua.pkgs.luaLib.genLuaPathAbsStr luaEnv)
|
||||
"--prefix"
|
||||
"LUA_CPATH"
|
||||
";"
|
||||
(package.lua.pkgs.luaLib.genLuaCPathAbsStr luaEnv)
|
||||
];
|
||||
}).overrideAttrs
|
||||
{
|
||||
# TODO: 2025-01-06
|
||||
# Wait for user feedback on disabling the fixup phase.
|
||||
# Ideally this will be upstreamed to nixpkgs.
|
||||
# See https://github.com/nix-community/nixvim/pull/3660#discussion_r2326250439
|
||||
dontFixup = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
# TODO: 2025-01-06
|
||||
# Wait for user feedback on disabling the fixup phase.
|
||||
# Ideally this will be upstreamed to nixpkgs.
|
||||
# See https://github.com/nix-community/nixvim/pull/3660#discussion_r2326250439
|
||||
wrappedNeovim = (pkgs.wrapNeovimUnstable package neovimConfig).overrideAttrs {
|
||||
dontFixup = true;
|
||||
};
|
||||
|
||||
customRC = lib.nixvim.concatNonEmptyLines [
|
||||
(lib.nixvim.wrapVimscriptForLua wrappedNeovim.initRc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue