[feature] flake.nix: reimplement removed checks

This commit is contained in:
Jalil David Salamé Messina 2024-05-04 20:59:17 +02:00
parent 39c2fb096c
commit 3f0a49d46b
Signed by: jalil
GPG key ID: F016B9E770737A0B

View file

@ -64,13 +64,38 @@
{ {
pkgs, pkgs,
system, system,
}: { }: let
src = builtins.path {
path = ./.;
name = "configuration.nix";
};
in {
nvim = nixvim.lib.${system}.check.mkTestDerivationFromNixvimModule { nvim = nixvim.lib.${system}.check.mkTestDerivationFromNixvimModule {
pkgs = import nixpkgs {inherit system overlays;}; pkgs = import nixpkgs {inherit system overlays;};
module = ./nvim/nixvim.nix; module = ./nvim/nixvim.nix;
}; };
# alejandra = {}; formatting = let
# typos = {}; fmt = pkgs.lib.getExe self.formatter.${system};
in
pkgs.stdenvNoCC.mkDerivation {
name = "nix-formatting-check";
dontUnpack = true;
dontBuild = true;
doCheck = true;
checkPhase = "${fmt} --check ${src}";
installPhase = "mkdir $out";
};
typos = let
typos = pkgs.lib.getExe pkgs.typos;
in
pkgs.stdenvNoCC.mkDerivation {
name = "typos-check";
dontUnpack = true;
dontBuild = true;
doCheck = true;
checkPhase = "${typos} --color=always ${src}";
installPhase = "mkdir $out";
};
} }
); );