flake: fix the check (#61)

The flake is missing nixvimLib, and the [simple template][tmpl] upstream
has changed since this repository was created. Align it with upstream to
fix the nix flake issue.

(cherry picked from commit 97facc071fd3408809bf74d32926ac9f14b550b7)

Co-authored-by: Roel de Cort <63876068+dc-tec@users.noreply.github.com>
This commit is contained in:
Wael Nasreddine 2024-11-26 00:50:34 -08:00 committed by GitHub
parent 840319afac
commit 879977be4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,33 +28,33 @@
"x86_64-darwin"
];
perSystem =
{
system,
pkgs,
self',
lib,
...
}:
let
nixvim' = nixvim.legacyPackages.${system};
nvim = nixvim'.makeNixvimWithModule {
inherit pkgs;
module = ./config;
perSystem = {
system,
pkgs,
self',
lib,
...
}: let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
inherit pkgs;
module = import ./config; # import the module directly
# You can use `extraSpecialArgs` to pass additional arguments to your module files
extraSpecialArgs = {
# inherit (inputs) foo;
};
in
{
checks = {
default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
};
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt-rfc-style.enable = true;
};
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in
{
checks = {
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
statix.enable = true;
nixfmt-rfc-style.enable = true;
};
};