lib/modules: pass inputs.nixpkgs into evalNixvim

Expose our locked nixpkgs as the `nixpkgs.source` module options.

This only happens when `evalNixvim` is part of a lib that was provided
`flake` as an argument.

Stubbed the `nixpkgs.source` option for now. Eventually, this will be
used to construct `pkgs` internally. For now, it's purely informational.
This commit is contained in:
Matt Sturgeon 2024-12-15 06:51:20 +00:00
parent e16d244865
commit bef9feb446
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
11 changed files with 62 additions and 11 deletions

View file

@ -1,5 +1,6 @@
{
lib,
flake ? null, # Optionally, provide the lib with access to the flake
_nixvimTests ? false,
}:
lib.fix (
@ -18,7 +19,7 @@ lib.fix (
extendedLib = call ./extend-lib.nix { inherit lib; };
keymaps = call ./keymap-helpers.nix { };
lua = call ./to-lua.nix { };
modules = call ./modules.nix { };
modules = call ./modules.nix { inherit flake; };
neovim-plugin = call ./neovim-plugin.nix { };
options = call ./options.nix { };
utils = call ./utils.nix { inherit _nixvimTests; };