add nix2lua to passthru

This commit is contained in:
Dmitriy Pleshevskiy 2022-11-19 19:52:39 +03:00
parent 465f27ac0c
commit 4edf3f4d64
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
2 changed files with 18 additions and 9 deletions

View file

@ -12,14 +12,17 @@
, tree-sitter
, neovimPlugins
, lib
, toLua
, nix2lua
, substituteAll
, ...
}:
let
inherit (builtins) catAttrs isFunction readFile;
myLib = import ./lib.nix { inherit lib; } // { inherit substituteAll toLua; };
myLib = import ./lib.nix { inherit lib; } // {
inherit substituteAll;
inherit (nix2lua.lib) toLua;
};
pluginParams = neovimPlugins // {
inherit plugins;
@ -52,7 +55,7 @@ let
pluginConfigs = catAttrs "luaConfig" pluginsSettings;
allConfigs = basicConfigs ++ pluginConfigs;
in
wrapNeovim neovim-unwrapped {
(wrapNeovim neovim-unwrapped {
inherit viAlias;
inherit vimAlias;
@ -65,4 +68,8 @@ wrapNeovim neovim-unwrapped {
packages.myVimPackages = { start = allPlugins; };
};
}
}).overrideAttrs (oldAttrs: {
passthru = oldAttrs.passthru // {
nix2lua = nix2lua.lib;
};
})

View file

@ -216,13 +216,15 @@
neovimPlugins = (listToAttrs (map buildPluginValuePair inputPlugins));
in
{ inherit neovimPlugins; };
{
inherit neovimPlugins;
inherit nix2lua;
};
in
{
lib = nix2lua.lib;
overlays = {
default = final: prev: {
myneovim = prev.callPackage self (mkNvimPlugins prev // nix2lua.lib);
myneovim = prev.callPackage self (mkNvimPlugins prev);
};
};
} //
@ -230,14 +232,14 @@
let
pkgs = import nixpkgs { inherit system; };
minimalNeovim = pkgs.callPackage self (mkNvimPlugins pkgs // nix2lua.lib);
minimalNeovim = pkgs.callPackage self (mkNvimPlugins pkgs);
recommendedNeovim = (minimalNeovim.override {
enableDevIcons = true;
enableTabby = true;
grammarFileTypes = [ "nix" "lua" ];
plugins = with nix2lua.lib; {
plugins = with minimalNeovim.nix2lua; {
nvimTree.settings = {
open_on_setup = true;
renderer = {