mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
lib/types: merge into extendedLib
This commit is contained in:
parent
38b09c1621
commit
b414a53649
3 changed files with 13 additions and 5 deletions
|
@ -1,5 +1,9 @@
|
|||
# Extends nixpkg's lib with our functions, as expected by our modules
|
||||
{ lib, helpers }:
|
||||
{
|
||||
call,
|
||||
lib,
|
||||
helpers,
|
||||
}:
|
||||
lib.extend (
|
||||
final: prev: {
|
||||
# Include our custom lib
|
||||
|
@ -7,5 +11,8 @@ lib.extend (
|
|||
|
||||
# Merge in our maintainers
|
||||
maintainers = prev.maintainers // import ./maintainers.nix;
|
||||
|
||||
# Merge in our custom types
|
||||
types = call ./types.nix { } // prev.types;
|
||||
}
|
||||
)
|
||||
|
|
|
@ -8,7 +8,7 @@ let
|
|||
# Used when importing parts of helpers
|
||||
call = lib.callPackageWith {
|
||||
# TODO: deprecate/remove using `helpers` in the subsections
|
||||
inherit pkgs helpers;
|
||||
inherit call pkgs helpers;
|
||||
lib = helpers.extendedLib;
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,6 @@ let
|
|||
lua = call ./to-lua.nix { };
|
||||
modules = call ./modules.nix { };
|
||||
neovim-plugin = call ./neovim-plugin.nix { };
|
||||
nixvimTypes = call ./types.nix { };
|
||||
options = call ./options.nix { };
|
||||
utils = call ./utils.nix { inherit _nixvimTests; };
|
||||
vim-plugin = call ./vim-plugin.nix { };
|
||||
|
@ -92,6 +91,9 @@ let
|
|||
# TODO: Deprecate this `maintainers` alias
|
||||
inherit (helpers.extendedLib) maintainers;
|
||||
|
||||
# TODO: Deprecate the old `nixvimTypes` alias?
|
||||
nixvimTypes = helpers.extendedLib.types;
|
||||
|
||||
toLuaObject = helpers.lua.toLua;
|
||||
mkLuaInline = helpers.lua.mkInline;
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# Custom types to be included in `lib.types`
|
||||
{ lib, helpers }:
|
||||
with lib;
|
||||
with helpers;
|
||||
|
@ -91,5 +92,3 @@ rec {
|
|||
}";
|
||||
};
|
||||
}
|
||||
# Allow to do `with nixvimTypes;` instead of `with types;`
|
||||
// lib.types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue