mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-07 21:44:02 -05:00
## CHANGES - Add GOTOOLCHAIN=local to shell environment - Configure preBuild hook in fabric package - Wrap goimports with local toolchain setting - Wrap gofmt with local toolchain setting - Update treefmt module import structure - Add pkgs parameter to treefmt config - Create shell script wrappers for Go tools
26 lines
522 B
Nix
26 lines
522 B
Nix
{ pkgs, ... }:
|
|
{
|
|
projectRootFile = "flake.nix";
|
|
|
|
programs = {
|
|
deadnix.enable = true;
|
|
statix.enable = true;
|
|
nixfmt.enable = true;
|
|
|
|
goimports = {
|
|
enable = true;
|
|
package = pkgs.writeShellScriptBin "goimports" ''
|
|
export GOTOOLCHAIN=local
|
|
exec ${pkgs.gotools}/bin/goimports "$@"
|
|
'';
|
|
};
|
|
gofmt = {
|
|
enable = true;
|
|
package = pkgs.writeShellScriptBin "gofmt" ''
|
|
export GOTOOLCHAIN=local
|
|
exec ${pkgs.go}/bin/gofmt "$@"
|
|
'';
|
|
};
|
|
};
|
|
}
|