feat: rust template #26

Open
liketechnik wants to merge 6 commits from liketechnik/feat/rust-template into main
Showing only changes of commit 17a8f609e5 - Show all commits

View file

@ -93,6 +93,29 @@
{ {
formatter = forSystems ({ pkgs, ... }: pkgs.alejandra); 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 ( packages = forSystems (
{ {
pkgs, pkgs,