From 4016a8de10b33d08c37e5fd8e19dab4f717bc546 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:13:21 +0100 Subject: [PATCH] gofumpt: disable CGO, set ldflags, inject version --- pkgs/development/tools/gofumpt/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/tools/gofumpt/default.nix b/pkgs/development/tools/gofumpt/default.nix index 2e1f95e24518..1a6e53afa025 100644 --- a/pkgs/development/tools/gofumpt/default.nix +++ b/pkgs/development/tools/gofumpt/default.nix @@ -13,6 +13,10 @@ buildGoModule rec { vendorHash = "sha256-W0WKEQgOIFloWsB4E1RTICVKVlj9ChGSpo92X+bjNEk="; + CGO_ENABLED = "0"; + + ldflags = "-s -w -X main.version=v${version}"; + checkFlags = [ # Requires network access (Error: module lookup disabled by GOPROXY=off). "-skip=^TestScript/diagnose$"