From 38d5d60dddd4a20f2ead32e5224a0f363d374ce1 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 18 Apr 2022 00:15:02 -0400 Subject: [PATCH] scaleway-cli: add ldflags details --- pkgs/tools/admin/scaleway-cli/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/tools/admin/scaleway-cli/default.nix b/pkgs/tools/admin/scaleway-cli/default.nix index 75e14391736d..f080a3f1d474 100644 --- a/pkgs/tools/admin/scaleway-cli/default.nix +++ b/pkgs/tools/admin/scaleway-cli/default.nix @@ -13,6 +13,16 @@ buildGoModule rec { vendorSha256 = "sha256-aaYS0WqNa8997kdV38blUsYovtUHHtEUXCTG9vwv2ko="; + ldflags = [ + "-w" + "-extldflags" + "-static" + "-X main.Version=${version}" + "-X main.GitCommit=ref/tags/${version}" + "-X main.GitBranch=HEAD" + "-X main.BuildDate=unknown" + ]; + # some tests require network access to scaleway's API, failing when sandboxed doCheck = false;