File tree 1 file changed +23
-0
lines changed
1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 21
21
nixpkgsFor = nixpkgs . legacyPackages ;
22
22
in
23
23
{
24
+ checks = forAllSystems (
25
+ system :
26
+ let
27
+ pkgs = nixpkgsFor . ${ system } ;
28
+ mkCheck =
29
+ name : deps : script :
30
+ pkgs . runCommand name { nativeBuildInputs = deps ; } ''
31
+ ${ script }
32
+ touch $out
33
+ '' ;
34
+ in
35
+ {
36
+ actionlint = mkCheck "check-actionlint" [ pkgs . actionlint ] "actionlint ${ ./.github/workflows } /*" ;
37
+ deadnix = mkCheck "check-deadnix" [ pkgs . deadnix ] "deadnix --fail ${ self } " ;
38
+ statix = mkCheck "check-statix" [ pkgs . statix ] "statix check ${ self } " ;
39
+ nixfmt = mkCheck "check-nixfmt" [ pkgs . nixfmt-rfc-style ] "nixfmt --check ${ self } " ;
40
+ rustfmt = mkCheck "check-rustfmt" [
41
+ pkgs . cargo
42
+ pkgs . rustfmt
43
+ ] "cd ${ self } && cargo fmt -- --check" ;
44
+ }
45
+ ) ;
46
+
24
47
devShells = forAllSystems (
25
48
system :
26
49
let
You can’t perform that action at this time.
0 commit comments