feat: add formatter for Nix files

This commit is contained in:
Lucien Cartier-Tilet 2025-05-24 23:57:40 +02:00
parent 4962bd5189
commit 03ae4c610e
Signed by: phundrak
SSH Key Fingerprint: SHA256:CE0HPsbW3L2YiJETx1zYZ2muMptaAqTN2g3498KrMkc

View File

@ -13,8 +13,15 @@
};
};
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachSystem ["x86_64-linux"] (system:
outputs =
{
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
@ -31,20 +38,24 @@
cargoLock.lockFile = ./Cargo.lock;
doCheck = true;
};
in {
packages.rustPackage = appRustBuild;
in
{
packages.pumoSystemInfo = appRustBuild;
formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style;
defaultPackage = appRustBuild;
devShell = with pkgs; mkShell {
buildInputs = [
bacon
cargo
cargo-deny
cargo-msrv
cargo-tarpaulin
just
rustVersion
];
};
devShell =
with pkgs;
mkShell {
buildInputs = [
bacon
cargo
cargo-deny
cargo-msrv
cargo-tarpaulin
just
rustVersion
];
};
}
);
}