1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-21 17:59:41 +01:00
nixvim/flake/lib.nix
Matt Sturgeon 695b0b80f8 lib/overlay: remove overridability
The lib-overlay was previously wrapped using `makeOverridable`, but its
only input is the flake itself, which is not intended to be overridden.

Remove the wrapper and expose the overlay as a plain function.
2025-11-20 20:57:10 +00:00

41 lines
982 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 ({ lib }: (lib.extend self.lib.overlay).nixvim) {
inherit lib;
};
overlay = 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;
}
)
);
}