From d5551849a5cc759afc706f87feef4a3f28d3ac6a Mon Sep 17 00:00:00 2001 From: phaer Date: Wed, 22 Apr 2026 11:49:32 +0200 Subject: [PATCH] go-toml: drop erroneous allowGoReference allowGoReference was added in 5a69b0b3c4a (2024-04-29) with the comment 'allowGoReference adds the flag -trimpath'. This is backwards: allowGoReference = true *disables* -trimpath and *allows* the Go compiler to remain in the runtime closure (257 MiB). The package builds and passes all tests without it. Dropping it re-enables -trimpath and shrinks the runtime closure from 263.6 MiB to 8.6 MiB. --- pkgs/by-name/go/go-toml/package.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/by-name/go/go-toml/package.nix b/pkgs/by-name/go/go-toml/package.nix index e18ac104f70d..5ea5e58c51ea 100644 --- a/pkgs/by-name/go/go-toml/package.nix +++ b/pkgs/by-name/go/go-toml/package.nix @@ -25,10 +25,6 @@ buildGoModule { "cmd/tomltestgen" ]; - # allowGoReference adds the flag `-trimpath` which is also denoted by, go-toml's goreleaser config - # - allowGoReference = true; - ldflags = [ "-s" "-w"