nix-community.nixvim/flake/lib.nix
Matt Sturgeon a70b16976b
lib: export evalNixvim as top-level alias
- `lib.nixvim.evalNixvim`
- `<nixvim>.lib.evalNixvim` (flake output)
2025-01-20 05:23:05 +00:00

43 lines
1 KiB
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;
};
# Top-top-level aliases
inherit (self.lib.nixvim)
evalNixvim
;
}
// 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 lib self system;
};
# 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;
}
)
);
}