chore: add nix
This commit is contained in:
parent
0a16d339a4
commit
499f13a634
7 changed files with 334 additions and 0 deletions
17
nix/formatter.nix
Normal file
17
nix/formatter.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, rustToolchain }:
|
||||
pkgs.writeShellApplication {
|
||||
name = "nix3-fmt-wrapper";
|
||||
runtimeInputs = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
nixfmt
|
||||
taplo
|
||||
fd
|
||||
;
|
||||
inherit rustToolchain;
|
||||
};
|
||||
text = ''
|
||||
fd "$@" -t f -e nix -x nixfmt -q '{}'
|
||||
fd "$@" -t f -e toml -x taplo format '{}'
|
||||
cargo fmt
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue