From 879977be4b0a41685f17622ed5257d6d9b083521 Mon Sep 17 00:00:00 2001 From: Wael Nasreddine Date: Tue, 26 Nov 2024 00:50:34 -0800 Subject: [PATCH] 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> --- flake.nix | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/flake.nix b/flake.nix index bc8492c..f906bff 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; };