mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
lib/extend-lib.nix returns a nixpkg's lib extended with our own helpers. This is exposed as `helpers.extendedLib`, but when evaluating our modules it should be assigned to `specialArgs.lib`. Outside of our modules you must still access our helpers via `config.lib.nixvim` or `config.lib.nixvim.extendedLib`. Within helpers' sub-sections, `lib` is the extended lib.
25 lines
429 B
Nix
25 lines
429 B
Nix
let
|
|
module =
|
|
{ lib, helpers, ... }:
|
|
{
|
|
assertions = [
|
|
{
|
|
assertion = lib ? nixvim;
|
|
message = "lib.nixvim should be defined";
|
|
}
|
|
{
|
|
assertion = lib.nixvim == helpers;
|
|
message = "lib.nixvim and helpers should be aliases";
|
|
}
|
|
];
|
|
};
|
|
in
|
|
{
|
|
top-level = {
|
|
inherit module;
|
|
};
|
|
|
|
files-module = {
|
|
files."libtest.lua" = module;
|
|
};
|
|
}
|