File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed
Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 2121 with :
2222 fail-mode : true
2323 - name : Check Nix formatting
24- run : nix develop -c check-nixpkgs -fmt
24+ run : nix develop -c check-nix -fmt
2525 - name : Check Rust formatting
26- run : nix develop -c check-rustfmt
26+ run : nix develop -c check-rust-fmt
2727 - name : Clippy
2828 run : nix develop -c cargo clippy
2929
Original file line number Diff line number Diff line change 8686 flake-checker = pkgs . naerskLib . buildPackage (
8787 {
8888 name = "flake-checker" ;
89- src = self ;
89+ src = builtins . path {
90+ name = "flake-checker-src" ;
91+ path = self ;
92+ } ;
9093 doCheck = true ;
9194 nativeBuildInputs = with pkgs ; [ ] ++ lib . optionals stdenv . isDarwin [ libiconv ] ;
9295 }
109112 {
110113 default =
111114 let
112- check-nixpkgs -fmt = pkgs . writeShellApplication {
113- name = "check-nixpkgs -fmt" ;
115+ check-nix -fmt = pkgs . writeShellApplication {
116+ name = "check-nix -fmt" ;
114117 runtimeInputs = with pkgs ; [
115118 git
116- nixpkgs-fmt
119+ nixfmt-rfc-style
117120 ] ;
118121 text = ''
119- nixpkgs-fmt --check "$( git ls-files '*.nix')"
122+ git ls-files '*.nix' | xargs nixfmt --check
120123 '' ;
121124 } ;
122- check-rustfmt = pkgs . writeShellApplication {
123- name = "check-rustfmt " ;
125+ check-rust-fmt = pkgs . writeShellApplication {
126+ name = "check-rust-fmt " ;
124127 runtimeInputs = with pkgs ; [ rustToolchain ] ;
125128 text = "cargo fmt --check" ;
126129 } ;
158161 cargo-watch
159162 rust-analyzer
160163
161- # Nix
162- nixpkgs-fmt
163-
164164 # CI checks
165- check-nixpkgs -fmt
166- check-rustfmt
165+ check-nix -fmt
166+ check-rust-fmt
167167
168168 # Scripts
169169 get-ref-statuses
170170 update-readme
171+
172+ self . formatter . ${ system }
171173 ] ;
172174
173175 env = {
177179 } ;
178180 }
179181 ) ;
182+
183+ formatter = forAllSystems ( { pkgs , ... } : pkgs . nixfmt-rfc-style ) ;
180184 } ;
181185}
You can’t perform that action at this time.
0 commit comments