forked from auxolotl/templates
feat(rust): rustfmt check example
This commit is contained in:
parent
90b7063195
commit
17a8f609e5
|
@ -93,6 +93,29 @@
|
|||
{
|
||||
formatter = forSystems ({ pkgs, ... }: pkgs.alejandra);
|
||||
|
||||
checks = forSystems (
|
||||
{ pkgs, fenixChannel, ... }:
|
||||
{
|
||||
rustfmt =
|
||||
pkgs.runCommand "check-rustfmt"
|
||||
{
|
||||
nativeBuildInputs =
|
||||
let
|
||||
fenixRustToolchain = fenixChannel.withComponents [
|
||||
"cargo"
|
||||
"rustfmt-preview"
|
||||
];
|
||||
in
|
||||
[ fenixRustToolchain ];
|
||||
}
|
||||
''
|
||||
cd ${./.}
|
||||
cargo fmt -- --check
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
);
|
||||
|
||||
packages = forSystems (
|
||||
{
|
||||
pkgs,
|
||||
|
|
Loading…
Reference in a new issue