Add pre-commit gofmt hook.

This commit is contained in:
CronyAkatsuki 2024-03-17 15:06:04 +01:00
parent 34270dfea0
commit 37f1c553b4
4 changed files with 138 additions and 2 deletions

View file

@ -6,8 +6,9 @@
inputs.gomod2nix.url = "github:nix-community/gomod2nix";
inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.gomod2nix.inputs.flake-utils.follows = "flake-utils";
inputs.pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
outputs = { self, nixpkgs, flake-utils, gomod2nix }:
outputs = { self, nixpkgs, flake-utils, gomod2nix, pre-commit-hooks }:
(flake-utils.lib.eachDefaultSystem
(system:
let
@ -23,6 +24,7 @@
};
devShells.default = callPackage ./shell.nix {
inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix;
inherit pre-commit-hooks;
};
})
);