Compare commits

..

1 commit

Author SHA1 Message Date
693eeee537
[feat] ci: add forgejo actions
All checks were successful
/ check (push) Successful in 26s
/ build (vm) (push) Successful in 2s
2024-06-08 22:34:45 +02:00
4 changed files with 39 additions and 19 deletions

View file

@ -112,25 +112,9 @@
pkgs = import nixpkgs {inherit system overlays;};
module = ./nvim/nixvim.nix;
};
formatting = pkgs.stdenvNoCC.mkDerivation {
name = "nix-formatting-check";
dontUnpack = true;
dontBuild = true;
doCheck = true;
checkPhase = "${pkgs.lib.getExe self.formatter.${system}} --check --quiet ${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";
};
fmt = pkgs.callPackage ./fmt.nix {inherit src;};
lint = pkgs.callPackage ./lint.nix {inherit src;};
typos = pkgs.callPackage ./lint.nix {inherit src;};
}
);

12
fmt.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
alejandra,
src,
}:
stdenvNoCC.mkDerivation {
name = "fmt-src";
inherit src;
buildPhase = "${lib.getExe alejandra} --check .";
installPhase = "mkdir $out";
}

12
lint.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
statix,
src,
}:
stdenvNoCC.mkDerivation {
name = "lint-src";
inherit src;
buildPhase = "${lib.getExe statix} check .";
installPhase = "mkdir $out";
}

12
typos.nix Normal file
View file

@ -0,0 +1,12 @@
{
lib,
stdenvNoCC,
typos,
src,
}:
stdenvNoCC.mkDerivation {
name = "typos-src";
inherit src;
buildPhase = "${lib.getExe typos} .";
installPhase = "mkdir $out";
}