File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed
Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change 9191 # Check if codebase is properly formatted.
9292 # This can be initiated with `nix build .#checks.<system>.nix-fmt`
9393 # or with `nix flake check`
94- nix-fmt = pkgs . runCommand "nix-fmt-check" { nativeBuildInputs = [ pkgs . alejandra ] ; } ''
95- alejandra --check ${ self } < /dev/null
96- touch $out
97- '' ;
94+ nix-fmt =
95+ pkgs . runCommand "nix-fmt-check"
96+ {
97+ src = self ;
98+ nativeBuildInputs = [ pkgs . alejandra pkgs . fd ] ;
99+ } ''
100+ cd "$src"
101+ fd -t f -e nix -x alejandra --check '{}'
102+ touch $out
103+ '' ;
98104
99105 # Check if Markdown sources are properly formatted
100106 # This can be initiated with `nix build .#checks.<system>.md-fmt`
101107 # or with `nix flake check`
102- md-fmt = pkgs . runCommand "md-fmt-check" { nativeBuildInputs = [ pkgs . deno ] ; } ''
103- deno fmt --check ${ self } --ext md
104- touch $out
105- '' ;
108+ md-fmt =
109+ pkgs . runCommand "md-fmt-check" {
110+ src = self ;
111+ nativeBuildInputs = [ pkgs . deno pkgs . fd ] ;
112+ } ''
113+ cd "$src"
114+ fd -t f -e md -x deno fmt --check '{}'
115+ touch $out
116+ '' ;
106117 } ;
107118 } ;
108119 } ;
You can’t perform that action at this time.
0 commit comments