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