mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
lib: make overrideable & access via flake
Add a non-system specific `<flake>.lib.nixvim` output, which is equivalent to the existing `<flake>.lib.<system>.helpers` output. This is now also wrapped with `lib.makeOverridable` to allow overriding the function args used to construct the nixvim-lib. Consistently access nixvim-lib via the new flake output, overriding where necessary.
This commit is contained in:
parent
e2ef15a665
commit
4b3b67fb6f
6 changed files with 33 additions and 35 deletions
|
@ -59,13 +59,7 @@ in
|
|||
config = mkMerge [
|
||||
{
|
||||
# Make our lib available to the host modules
|
||||
# NOTE: user-facing so we must include the legacy `pkgs` argument
|
||||
lib.nixvim = lib.mkDefault (
|
||||
import ../lib {
|
||||
inherit lib;
|
||||
flake = self;
|
||||
}
|
||||
);
|
||||
lib.nixvim = lib.mkDefault self.lib.nixvim;
|
||||
|
||||
# Make nixvim's "extended" lib available to the host's module args
|
||||
_module.args.nixvimLib = lib.mkDefault config.lib.nixvim.extendedLib;
|
||||
|
|
|
@ -9,11 +9,7 @@ default_pkgs: self:
|
|||
}:
|
||||
let
|
||||
# NOTE: we are importing this just for evalNixvim
|
||||
helpers = import ../lib {
|
||||
inherit lib _nixvimTests;
|
||||
flake = self;
|
||||
};
|
||||
|
||||
helpers = self.lib.nixvim.override { inherit _nixvimTests; };
|
||||
inherit (helpers.modules) evalNixvim;
|
||||
|
||||
mkNvim =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue