nix-community.nixvim/flake-modules/lib.nix
Matt Sturgeon 191b0a9502
treewide: avoid passing pkgs to our lib
In the two places where our "helpers" lib is exclusively internal
(flake module args and building the docs), we no longer supply `pkgs`.

In the other 4 locations, we now note why we still do in a comment.
2024-09-22 18:18:05 +01:00

22 lines
548 B
Nix

{
config,
lib,
withSystem,
...
}:
{
_module.args.helpers = import ../lib { inherit lib; };
# TODO: output lib without pkgs at the top-level
flake.lib = lib.genAttrs config.systems (
lib.flip withSystem (
{ pkgs, ... }:
{
# NOTE: this is the publicly documented flake output we've had for a while
check = import ../lib/tests.nix { inherit lib pkgs; };
# NOTE: user-facing so we must include the legacy `pkgs` argument
helpers = import ../lib { inherit lib pkgs; };
}
)
);
}