nix-community.nixvim/flake-modules/lib.nix
Matt Sturgeon aefab28b3b
lib/overlay: init
The overlay allows extending any instance of nixpkgs-lib into a
nixvim-compatible "extended" instance.
2024-12-23 09:58:54 +00:00

37 lines
922 B
Nix

{
self,
config,
lib,
withSystem,
...
}:
{
# Expose lib as a flake-parts module arg
_module.args = {
helpers = self.lib.nixvim;
};
# Public `lib` flake output
flake.lib =
{
nixvim = lib.makeOverridable (import ../lib) {
inherit lib;
flake = self;
};
overlay = lib.makeOverridable (import ../lib/overlay.nix) {
flake = self;
};
}
// lib.genAttrs config.systems (
lib.flip withSystem (
{ pkgs, system, ... }:
{
# NOTE: this is the publicly documented flake output we've had for a while
check = pkgs.callPackage ../lib/tests.nix { inherit self; };
# NOTE: no longer needs to be per-system
helpers = lib.warn "nixvim: `<nixvim>.lib.${system}.helpers` has been moved to `<nixvim>.lib.nixvim` and no longer depends on a specific system" self.lib.nixvim;
}
)
);
}