Various fixes and change formatter to nixfmt-rfc-style #19
4 changed files with 9 additions and 39 deletions
12
flake.nix
12
flake.nix
|
@ -101,14 +101,20 @@
|
||||||
path = ./.;
|
path = ./.;
|
||||||
name = "configuration.nix";
|
name = "configuration.nix";
|
||||||
};
|
};
|
||||||
|
runCmdInSrc = name: cmd:
|
||||||
|
pkgs.runCommandNoCC name {} ''
|
||||||
|
cd ${src}
|
||||||
|
${cmd}
|
||||||
|
mkdir $out
|
||||||
|
'';
|
||||||
in {
|
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/standalone.nix;
|
module = ./nvim/standalone.nix;
|
||||||
};
|
};
|
||||||
fmt = pkgs.callPackage ./fmt.nix {inherit src;};
|
fmt = runCmdInSrc "fmt-src" "${lib.getExe self.formatter.${system}} --check .";
|
||||||
lint = pkgs.callPackage ./lint.nix {inherit src;};
|
lint = runCmdInSrc "lint-src" "${lib.getExe pkgs.statix} check .";
|
||||||
typos = pkgs.callPackage ./lint.nix {inherit src;};
|
typos = runCmdInSrc "typos-src" "${lib.getExe pkgs.typos} .";
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
12
fmt.nix
12
fmt.nix
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenvNoCC,
|
|
||||||
alejandra,
|
|
||||||
src,
|
|
||||||
}:
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
name = "fmt-src";
|
|
||||||
inherit src;
|
|
||||||
buildPhase = "${lib.getExe alejandra} --check .";
|
|
||||||
installPhase = "mkdir $out";
|
|
||||||
}
|
|
12
lint.nix
12
lint.nix
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenvNoCC,
|
|
||||||
statix,
|
|
||||||
src,
|
|
||||||
}:
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
name = "lint-src";
|
|
||||||
inherit src;
|
|
||||||
buildPhase = "${lib.getExe statix} check .";
|
|
||||||
installPhase = "mkdir $out";
|
|
||||||
}
|
|
12
typos.nix
12
typos.nix
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
stdenvNoCC,
|
|
||||||
typos,
|
|
||||||
src,
|
|
||||||
}:
|
|
||||||
stdenvNoCC.mkDerivation {
|
|
||||||
name = "typos-src";
|
|
||||||
inherit src;
|
|
||||||
buildPhase = "${lib.getExe typos} .";
|
|
||||||
installPhase = "mkdir $out";
|
|
||||||
}
|
|
Loading…
Reference in a new issue