nixos-combined-flake/templates/go/shell.nix

50 lines
621 B
Nix

{ pkgs
, name
, mkGoEnv
, gomod2nix
, pre-commit-check
, go
, gotools
, go-tools
, delve
, golines
, richgo
, gotestsum
, golangci-lint
, gotests
, gomodifytags
, gofumpt
, govulncheck
, mockgen
, ginkgo
, ...
}:
let
goEnv = mkGoEnv {
inherit go;
pwd = ./.;
};
in
pkgs.mkShell {
inherit (pre-commit-check) shellHook;
buildInputs = pre-commit-check.enabledPackages;
name = "${name}-dev";
packages = [
goEnv
gomod2nix
gotools
go-tools
golines
richgo
gotestsum
gotests
delve
golangci-lint
gomodifytags
gofumpt
govulncheck
mockgen
ginkgo
];
}