chore: inital commit.
This commit is contained in:
commit
87a28a1361
10 changed files with 953 additions and 0 deletions
39
shell.nix
Normal file
39
shell.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
pkgs ? (
|
||||
let
|
||||
inherit (builtins) fetchTree fromJSON readFile;
|
||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
||||
in
|
||||
import (fetchTree nixpkgs.locked) {
|
||||
overlays = [
|
||||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
||||
];
|
||||
}
|
||||
),
|
||||
mkGoEnv ? pkgs.mkGoEnv,
|
||||
gomod2nix ? pkgs.gomod2nix,
|
||||
pre-commit-hooks,
|
||||
}: let
|
||||
goEnv = mkGoEnv {pwd = ./.;};
|
||||
pre-commit-check = pre-commit-hooks.lib.${pkgs.system}.run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
# General formaters
|
||||
end-of-file-fixer.enable = true;
|
||||
mixed-line-endings.enable = true;
|
||||
# Git commit lint
|
||||
commitizen.enable = true;
|
||||
# Go section
|
||||
gofmt.enable = true;
|
||||
# golangci-lint.enable = true;
|
||||
govet.enable = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.mkShell {
|
||||
inherit (pre-commit-check) shellHook;
|
||||
packages = [
|
||||
goEnv
|
||||
gomod2nix
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue