Currently the lib that is propogated to nixvim modules comes from the `nixpkgs-lib` input from the `flake-parts` flake. This works fine locally because the `nixpkgs-lib` follows `nixpkgs` however downstream repos cannot cannot make `nixvim` follow their own version of `flake-parts` without also overriding `nixpkgs-lib`. * Clearer path for where lib passed to modules is coming from * Allow downstream repos more flexibility in follows Pull lib from the pinned `nixpkgs` input.
36 lines
823 B
Nix
36 lines
823 B
Nix
{
|
|
self,
|
|
config,
|
|
lib,
|
|
withSystem,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
# Public `lib` flake output
|
|
flake.lib = {
|
|
nixvim = lib.makeOverridable ({ lib }: (lib.extend self.lib.overlay).nixvim) {
|
|
# NOTE: Use the lib from nixpkgs pin to prevent a dependency
|
|
# on pinning the flake-parts nixpkgs-lib to the nixpkgs pin
|
|
inherit (inputs.nixpkgs) 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;
|
|
};
|
|
}
|
|
)
|
|
);
|
|
}
|