From dd07491333d7fdd7f8733a351ec16316ae7a8ef9 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 20 Aug 2021 17:12:13 +1000 Subject: [PATCH] kubebuilder: buildFlagsArray -> ldflags --- .../networking/cluster/kubebuilder/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/networking/cluster/kubebuilder/default.nix b/pkgs/applications/networking/cluster/kubebuilder/default.nix index 5784c2a472ef..eb29cba7de88 100644 --- a/pkgs/applications/networking/cluster/kubebuilder/default.nix +++ b/pkgs/applications/networking/cluster/kubebuilder/default.nix @@ -20,13 +20,13 @@ buildGoModule rec { subPackages = ["cmd"]; - preBuild = '' - export buildFlagsArray+=("-ldflags=-X main.kubeBuilderVersion=v${version} \ - -X main.goos=$GOOS \ - -X main.goarch=$GOARCH \ - -X main.gitCommit=v${version} \ - -X main.buildDate=v${version}") - ''; + ldflags = [ + "-X main.kubeBuilderVersion=v${version}" + "-X main.goos=${go.GOOS}" + "-X main.goarch=${go.GOARCH}" + "-X main.gitCommit=v${version}" + "-X main.buildDate=v${version}" + ]; doCheck = true;