mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
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.
34 lines
682 B
Nix
34 lines
682 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;
|
|
};
|
|
}
|
|
// lib.genAttrs config.systems (
|
|
lib.flip withSystem (
|
|
{ pkgs, ... }:
|
|
{
|
|
# 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 = self.lib.nixvim;
|
|
}
|
|
)
|
|
);
|
|
}
|