aboutsummaryrefslogtreecommitdiff
path: root/nix/dev.nix
diff options
context:
space:
mode:
authorseth <getchoo@tuta.io>2023-05-27 13:45:28 -0400
committerseth <getchoo@tuta.io>2023-05-27 19:14:50 -0400
commitd582bf7f1f803d0ea8422732b46e25ee05f2fcb0 (patch)
tree30e294481b00a0d979dc0cbf4a697e99ab4ad513 /nix/dev.nix
parentf24211e8b5d9af24ac3e27b0fdb50000a962c35f (diff)
downloadPrismLauncher-d582bf7f1f803d0ea8422732b46e25ee05f2fcb0.tar.gz
PrismLauncher-d582bf7f1f803d0ea8422732b46e25ee05f2fcb0.tar.bz2
PrismLauncher-d582bf7f1f803d0ea8422732b46e25ee05f2fcb0.zip
feat(nix): flake-utils -> flake-parts
Signed-off-by: seth <getchoo@tuta.io>
Diffstat (limited to 'nix/dev.nix')
-rw-r--r--nix/dev.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nix/dev.nix b/nix/dev.nix
new file mode 100644
index 00000000..0fe68c4e
--- /dev/null
+++ b/nix/dev.nix
@@ -0,0 +1,44 @@
+{
+ inputs,
+ self,
+ ...
+}: {
+ perSystem = {
+ system,
+ pkgs,
+ ...
+ }: {
+ checks = {
+ pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
+ src = self;
+ hooks = {
+ markdownlint.enable = true;
+
+ alejandra.enable = true;
+ deadnix.enable = true;
+
+ clang-format = {
+ enable =
+ false; # As most of the codebase is **not** formatted, we don't want clang-format yet
+ types_or = ["c" "c++"];
+ };
+ };
+ };
+ };
+
+ devShells.default = pkgs.mkShell {
+ inherit (self.checks.${system}.pre-commit-check) shellHook;
+ packages = with pkgs; [
+ nodePackages.markdownlint-cli
+ alejandra
+ deadnix
+ clang-tools
+ ];
+
+ inputsFrom = [self.packages.${system}.default];
+ buildInputs = with pkgs; [ccache ninja];
+ };
+
+ formatter = pkgs.alejandra;
+ };
+}