diff options
36 files changed, 102 insertions, 121 deletions
diff --git a/pkgs/applications/misc/cointop/default.nix b/pkgs/applications/misc/cointop/default.nix index 62bcf6a99d2b9..4b2f45c47f4f1 100644 --- a/pkgs/applications/misc/cointop/default.nix +++ b/pkgs/applications/misc/cointop/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { goPackagePath = "github.com/miguelmota/cointop"; - buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/cointop.version=${version}" ]; + ldflags = [ "-s" "-w" "-X ${goPackagePath}/cointop.version=${version}" ]; meta = with lib; { description = "The fastest and most interactive terminal based UI application for tracking cryptocurrencies"; diff --git a/pkgs/applications/networking/cluster/argo/default.nix b/pkgs/applications/networking/cluster/argo/default.nix index a49879e535284..6372f19ee6c72 100644 --- a/pkgs/applications/networking/cluster/argo/default.nix +++ b/pkgs/applications/networking/cluster/argo/default.nix @@ -43,15 +43,14 @@ buildGoModule rec { ${staticfiles}/bin/staticfiles -o server/static/files.go ui/dist/app ''; - buildFlagsArray = '' - -ldflags= - -s -w - -X github.com/argoproj/argo-workflows/v3.buildDate=unknown - -X github.com/argoproj/argo-workflows/v3.gitCommit=${src.rev} - -X github.com/argoproj/argo-workflows/v3.gitTag=${src.rev} - -X github.com/argoproj/argo-workflows/v3.gitTreeState=clean - -X github.com/argoproj/argo-workflows/v3.version=${version} - ''; + ldflags = [ + "-s" "-w" + "-X github.com/argoproj/argo-workflows/v3.buildDate=unknown" + "-X github.com/argoproj/argo-workflows/v3.gitCommit=${src.rev}" + "-X github.com/argoproj/argo-workflows/v3.gitTag=${src.rev}" + "-X github.com/argoproj/argo-workflows/v3.gitTreeState=clean" + "-X github.com/argoproj/argo-workflows/v3.version=${version}" + ]; postInstall = '' for shell in bash zsh; do diff --git a/pkgs/applications/networking/cluster/kops/default.nix b/pkgs/applications/networking/cluster/kops/default.nix index 54d13f819ab87..389be11e506cc 100644 --- a/pkgs/applications/networking/cluster/kops/default.nix +++ b/pkgs/applications/networking/cluster/kops/default.nix @@ -21,11 +21,10 @@ let nativeBuildInputs = [ go-bindata installShellFiles ]; subPackages = [ "cmd/kops" ]; - buildFlagsArray = '' - -ldflags= - -X k8s.io/kops.Version=${version} - -X k8s.io/kops.GitVersion=${version} - ''; + ldflags = [ + "-X k8s.io/kops.Version=${version}" + "-X k8s.io/kops.GitVersion=${version}" + ]; preBuild = '' (cd go/src/k8s.io/kops diff --git a/pkgs/applications/networking/cluster/kube-router/default.nix b/pkgs/applications/networking/cluster/kube-router/default.nix index 85b83c994df88..b9a282b5cd161 100644 --- a/pkgs/applications/networking/cluster/kube-router/default.nix +++ b/pkgs/applications/networking/cluster/kube-router/default.nix @@ -13,13 +13,10 @@ buildGoPackage rec { sha256 = "sha256-/VToLQexvRtcBU+k8WnGEcfLfxme/hgRnhU8723BEFU="; }; - buildFlagsArray = '' - -ldflags= - -X - ${goPackagePath}/pkg/cmd.version=${version} - -X - ${goPackagePath}/pkg/cmd.buildDate=Nix - ''; + ldflags = [ + "-X ${goPackagePath}/pkg/cmd.version=${version}" + "-X ${goPackagePath}/pkg/cmd.buildDate=Nix" + ]; meta = with lib; { homepage = "https://www.kube-router.io/"; diff --git a/pkgs/applications/networking/cluster/kubeless/default.nix b/pkgs/applications/networking/cluster/kubeless/default.nix index 38323b98b1943..537fb611783ea 100644 --- a/pkgs/applications/networking/cluster/kubeless/default.nix +++ b/pkgs/applications/networking/cluster/kubeless/default.nix @@ -17,9 +17,9 @@ buildGoPackage rec { subPackages = [ "cmd/kubeless" ]; - buildFlagsArray = '' - -ldflags=-s -w -X github.com/kubeless/kubeless/pkg/version.Version=${version} - ''; + ldflags = [ + "-s" "-w" "-X github.com/kubeless/kubeless/pkg/version.Version=${version}" + ]; postInstall = '' for shell in bash; do diff --git a/pkgs/applications/networking/cluster/minishift/default.nix b/pkgs/applications/networking/cluster/minishift/default.nix index 5b3b17b3df201..488d0c4327a26 100644 --- a/pkgs/applications/networking/cluster/minishift/default.nix +++ b/pkgs/applications/networking/cluster/minishift/default.nix @@ -34,12 +34,11 @@ in buildGoPackage rec { --replace '"runtime"' "" ''; - buildFlagsArray = '' - -ldflags= - -X ${goPackagePath}/pkg/version.minishiftVersion=${version} - -X ${goPackagePath}/pkg/version.centOsIsoVersion=${centOsIsoVersion} - -X ${goPackagePath}/pkg/version.openshiftVersion=${openshiftVersion} - ''; + ldflags = [ + "-X ${goPackagePath}/pkg/version.minishiftVersion=${version}" + "-X ${goPackagePath}/pkg/version.centOsIsoVersion=${centOsIsoVersion}" + "-X ${goPackagePath}/pkg/version.openshiftVersion=${openshiftVersion}" + ]; preBuild = '' (cd go/src/github.com/minishift/minishift diff --git a/pkgs/applications/version-management/git-lfs/default.nix b/pkgs/applications/version-management/git-lfs/default.nix index 5976f1de6a76a..77a8d9d897f1c 100644 --- a/pkgs/applications/version-management/git-lfs/default.nix +++ b/pkgs/applications/version-management/git-lfs/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { nativeBuildInputs = [ ronn installShellFiles ]; - buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/config.Vendor=${version} -X ${goPackagePath}/config.GitCommit=${src.rev}" ]; + ldflags = [ "-s" "-w" "-X ${goPackagePath}/config.Vendor=${version}" "-X ${goPackagePath}/config.GitCommit=${src.rev}" ]; subPackages = [ "." ]; diff --git a/pkgs/applications/virtualization/docker-slim/default.nix b/pkgs/applications/virtualization/docker-slim/default.nix index 6e6db87a6cf83..a38b0675af2d7 100644 --- a/pkgs/applications/virtualization/docker-slim/default.nix +++ b/pkgs/applications/virtualization/docker-slim/default.nix @@ -23,11 +23,10 @@ buildGoPackage rec { makeWrapper ]; - buildFlagsArray = [ - ''-ldflags= - -s -w -X ${goPackagePath}/pkg/version.appVersionTag=${version} - -X ${goPackagePath}/pkg/version.appVersionRev=${src.rev} - '' + ldflags = [ + "-s" "-w" + "-X ${goPackagePath}/pkg/version.appVersionTag=${version}" + "-X ${goPackagePath}/pkg/version.appVersionRev=${src.rev}" ]; # docker-slim tries to create its state dir next to the binary (inside the nix diff --git a/pkgs/applications/virtualization/nvidia-container-runtime/default.nix b/pkgs/applications/virtualization/nvidia-container-runtime/default.nix index 92717b988919b..43eb1639b43e5 100644 --- a/pkgs/applications/virtualization/nvidia-container-runtime/default.nix +++ b/pkgs/applications/virtualization/nvidia-container-runtime/default.nix @@ -35,7 +35,7 @@ buildGoPackage rec { }; goPackagePath = "github.com/${pname}/src"; - buildFlagsArray = [ "-ldflags=" "-s -w" ]; + ldflags = [ "-s" "-w" ]; nativeBuildInputs = [ makeWrapper ]; postInstall = '' diff --git a/pkgs/development/tools/container-linux-config-transpiler/default.nix b/pkgs/development/tools/container-linux-config-transpiler/default.nix index b5200e22cad87..5b2a7fddeb459 100644 --- a/pkgs/development/tools/container-linux-config-transpiler/default.nix +++ b/pkgs/development/tools/container-linux-config-transpiler/default.nix @@ -15,9 +15,9 @@ buildGoPackage rec { sha256="1w6nvgrl5qp3ci9igflk9dlk3020psv5m4f3p57f3qcx9vrcl4lw"; }; - buildFlagsArray = '' - -ldflags=-X ${goPackagePath}/internal/version.Raw=v${version} - ''; + ldflags = [ + "-X ${goPackagePath}/internal/version.Raw=v${version}" + ]; postInstall = '' mv $out/bin/{internal,ct} @@ -32,4 +32,3 @@ buildGoPackage rec { platforms = with platforms; unix; }; } - diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix index ee40f1b8cf87b..a507ba8650fa5 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix @@ -19,12 +19,11 @@ buildGoPackage rec { goPackagePath = "gitlab.com/gitlab-org/gitlab-runner"; subPackages = [ "." ]; commonPackagePath = "${goPackagePath}/common"; - buildFlagsArray = '' - -ldflags= - -X ${commonPackagePath}.NAME=gitlab-runner - -X ${commonPackagePath}.VERSION=${version} - -X ${commonPackagePath}.REVISION=v${version} - ''; + ldflags = [ + "-X ${commonPackagePath}.NAME=gitlab-runner" + "-X ${commonPackagePath}.VERSION=${version}" + "-X ${commonPackagePath}.REVISION=v${version}" + ]; src = fetchFromGitLab { owner = "gitlab-org"; diff --git a/pkgs/development/tools/dep/default.nix b/pkgs/development/tools/dep/default.nix index ff7bad87afd64..2c7345d7cc56c 100644 --- a/pkgs/development/tools/dep/default.nix +++ b/pkgs/development/tools/dep/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { sha256 = "02akzbjar1v01rdal746vk6mklff29yk2mqfyjk1zrs0mlg38ygd"; }; - buildFlagsArray = ("-ldflags=-s -w -X main.commitHash=${rev} -X main.version=${version}"); + ldflags = [ "-s" "-w" "-X main.commitHash=${rev}" "-X main.version=${version}" ]; meta = with lib; { homepage = "https://github.com/golang/dep"; diff --git a/pkgs/development/tools/glide/default.nix b/pkgs/development/tools/glide/default.nix index 05e4ae8106122..e97feca116722 100644 --- a/pkgs/development/tools/glide/default.nix +++ b/pkgs/development/tools/glide/default.nix @@ -6,10 +6,9 @@ buildGoPackage rec { goPackagePath = "github.com/Masterminds/glide"; - buildFlagsArray = '' - -ldflags= - -X main.version=${version} - ''; + ldflags = [ + "-X main.version=${version}" + ]; src = fetchFromGitHub { rev = "v${version}"; diff --git a/pkgs/development/tools/kube-aws/default.nix b/pkgs/development/tools/kube-aws/default.nix index 0e96683b06e8b..e095755df1103 100644 --- a/pkgs/development/tools/kube-aws/default.nix +++ b/pkgs/development/tools/kube-aws/default.nix @@ -22,9 +22,9 @@ buildGoPackage rec { go generate ./core/root/config )''; - buildFlagsArray = '' - -ldflags=-X github.com/coreos/kube-aws/core/controlplane/cluster.VERSION=v${version} - ''; + ldflags = [ + "-X github.com/coreos/kube-aws/core/controlplane/cluster.VERSION=v${version}" + ]; meta = { description = "Tool for deploying kubernetes on aws using coreos"; diff --git a/pkgs/development/tools/misc/linuxkit/default.nix b/pkgs/development/tools/misc/linuxkit/default.nix index eeb2102bdf0ce..da608ba5a0617 100644 --- a/pkgs/development/tools/misc/linuxkit/default.nix +++ b/pkgs/development/tools/misc/linuxkit/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { subPackages = [ "src/cmd/linuxkit" ]; - buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/src/cmd/linuxkit/version.GitCommit=${src.rev} -X ${goPackagePath}/src/cmd/linuxkit/version.Version=${version}" ]; + ldflags = [ "-s" "-w" "-X ${goPackagePath}/src/cmd/linuxkit/version.GitCommit=${src.rev}" "-X ${goPackagePath}/src/cmd/linuxkit/version.Version=${version}" ]; meta = with lib; { description = "A toolkit for building secure, portable and lean operating systems for containers"; diff --git a/pkgs/development/tools/misc/terraform-lsp/default.nix b/pkgs/development/tools/misc/terraform-lsp/default.nix index 0cfd63ffa2838..d55367e706584 100644 --- a/pkgs/development/tools/misc/terraform-lsp/default.nix +++ b/pkgs/development/tools/misc/terraform-lsp/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { goPackagePath = "github.com/juliosueiras/terraform-lsp"; - buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version} -X main.GitCommit=${src.rev}" ]; + ldflags = [ "-s" "-w" "-X main.Version=${version}" "-X main.GitCommit=${src.rev}" ]; meta = with lib; { description = "Language Server Protocol for Terraform"; diff --git a/pkgs/development/tools/toxiproxy/default.nix b/pkgs/development/tools/toxiproxy/default.nix index 448c14ffaf1ab..5ecd6ad2eb6f1 100644 --- a/pkgs/development/tools/toxiproxy/default.nix +++ b/pkgs/development/tools/toxiproxy/default.nix @@ -12,7 +12,7 @@ buildGoPackage rec { goPackagePath = "github.com/Shopify/toxiproxy"; subPackages = ["cmd" "cli"]; - buildFlagsArray = "-ldflags=-X github.com/Shopify/toxiproxy.Version=v${version}"; + ldflags = [ "-X github.com/Shopify/toxiproxy.Version=v${version}" ]; postInstall = '' mv $out/bin/cli $out/bin/toxiproxy-cli diff --git a/pkgs/servers/cayley/default.nix b/pkgs/servers/cayley/default.nix index c9d06d4977147..13bf9326c22bd 100644 --- a/pkgs/servers/cayley/default.nix +++ b/pkgs/servers/cayley/default.nix @@ -15,10 +15,9 @@ buildGoPackage rec { goDeps = ./deps.nix; - buildFlagsArray = '' - -ldflags= - -X=main.Version=${version} - ''; + ldflags = [ + "-X=main.Version=${version}" + ]; meta = { homepage = "https://cayley.io/"; diff --git a/pkgs/servers/gotify/default.nix b/pkgs/servers/gotify/default.nix index d0a3d9c10a20e..8f3739b4ebfb8 100644 --- a/pkgs/servers/gotify/default.nix +++ b/pkgs/servers/gotify/default.nix @@ -45,8 +45,8 @@ buildGoModule rec { # produce binaries which panic when executed and are not interesting at all subPackages = [ "." ]; - buildFlagsArray = [ - "-ldflags=-X main.Version=${version} -X main.Mode=prod" + ldflags = [ + "-X main.Version=${version}" "-X main.Mode=prod" ]; meta = with lib; { diff --git a/pkgs/servers/mail/mailhog/default.nix b/pkgs/servers/mail/mailhog/default.nix index 0032c4a630e92..d4c358ec47f58 100644 --- a/pkgs/servers/mail/mailhog/default.nix +++ b/pkgs/servers/mail/mailhog/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { sha256 = "124216850572r1h0ii7ad6jd1cd5czcvkz7k2jzvjb4pv2kl8p3y"; }; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "Web and API based SMTP testing"; diff --git a/pkgs/servers/mattermost/default.nix b/pkgs/servers/mattermost/default.nix index 6a7ba06df885c..14996cecc6598 100644 --- a/pkgs/servers/mattermost/default.nix +++ b/pkgs/servers/mattermost/default.nix @@ -16,10 +16,9 @@ let goPackagePath = "github.com/mattermost/mattermost-server"; - buildFlagsArray = '' - -ldflags= - -X ${goPackagePath}/model.BuildNumber=nixpkgs-${version} - ''; + ldflags = [ + "-X ${goPackagePath}/model.BuildNumber=nixpkgs-${version}" + ]; }; diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix index bc3cf7539eceb..251c977bd4df9 100644 --- a/pkgs/servers/monitoring/prometheus/alertmanager.nix +++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -14,15 +14,14 @@ buildGoPackage rec { sha256 = "0zrzyaqs73pz4rmj4xaj15x4n1542m0nb7jqm2j77k07j75r5w41"; }; - buildFlagsArray = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in '' - -ldflags= - -X ${t}.Version=${version} - -X ${t}.Revision=${src.rev} - -X ${t}.Branch=unknown - -X ${t}.BuildUser=nix@nixpkgs - -X ${t}.BuildDate=unknown - -X ${t}.GoVersion=${lib.getVersion go} - ''; + ldflags = let t = "${goPackagePath}/vendor/github.com/prometheus/common/version"; in [ + "-X ${t}.Version=${version}" + "-X ${t}.Revision=${src.rev}" + "-X ${t}.Branch=unknown" + "-X ${t}.BuildUser=nix@nixpkgs" + "-X ${t}.BuildDate=unknown" + "-X ${t}.GoVersion=${lib.getVersion go}" + ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/servers/monitoring/prometheus/nginx-exporter.nix b/pkgs/servers/monitoring/prometheus/nginx-exporter.nix index 65206256194a3..8b39915193efd 100644 --- a/pkgs/servers/monitoring/prometheus/nginx-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/nginx-exporter.nix @@ -6,8 +6,8 @@ buildGoPackage rec { goPackagePath = "github.com/nginxinc/nginx-prometheus-exporter"; - buildFlagsArray = [ - "-ldflags=" "-X main.version=${version}" + ldflags = [ + "-X main.version=${version}" ]; src = fetchFromGitHub { diff --git a/pkgs/servers/monitoring/prometheus/openldap-exporter.nix b/pkgs/servers/monitoring/prometheus/openldap-exporter.nix index a439c84bca9b3..84cb7a62f243c 100644 --- a/pkgs/servers/monitoring/prometheus/openldap-exporter.nix +++ b/pkgs/servers/monitoring/prometheus/openldap-exporter.nix @@ -11,12 +11,11 @@ buildGoPackage rec { sha256 = "sha256-G4bTYFm1Zh+7gfSIZnfrPyQ15967ebEzl33pgZu23D4="; }; - buildFlagsArray = '' - -ldflags= - -s -w - -X github.com/tomcz/openldap_exporter.tag=v${version} - -X github.com/tomcz/openldap_exporter.commit=unknown - ''; + ldflags = [ + "-s" "-w" + "-X github.com/tomcz/openldap_exporter.tag=v${version}" + "-X github.com/tomcz/openldap_exporter.commit=unknown" + ]; goPackagePath = "github.com/tomcz/openldap_exporter"; diff --git a/pkgs/servers/monitoring/prometheus/pushgateway.nix b/pkgs/servers/monitoring/prometheus/pushgateway.nix index 0bdb0680ae9d1..f14ceec44e217 100644 --- a/pkgs/servers/monitoring/prometheus/pushgateway.nix +++ b/pkgs/servers/monitoring/prometheus/pushgateway.nix @@ -17,15 +17,14 @@ buildGoPackage rec { buildUser = "nix@nixpkgs"; buildDate = "19700101-00:00:00"; - buildFlagsArray = '' - -ldflags= - -X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Version=${version} - -X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Revision=${rev} - -X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Branch=${rev} - -X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildUser=${buildUser} - -X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildDate=${buildDate} - -X main.goVersion=${lib.getVersion go} - ''; + ldflags = [ + "-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Version=${version}" + "-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Revision=${rev}" + "-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.Branch=${rev}" + "-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildUser=${buildUser}" + "-X github.com/prometheus/pushgateway/vendor/github.com/prometheus/common/version.BuildDate=${buildDate}" + "-X main.goVersion=${lib.getVersion go}" + ]; doInstallCheck = true; installCheckPhase = '' diff --git a/pkgs/servers/tegola/default.nix b/pkgs/servers/tegola/default.nix index 5e3aa2d0ef674..d94f97baf8654 100644 --- a/pkgs/servers/tegola/default.nix +++ b/pkgs/servers/tegola/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { sha256 = "sha256-NA2KwyhLLIusf6a6v+OcmHz91kPcIhvG9PRmRk8h+fQ="; }; - buildFlagsArray = [ "-ldflags=-s -w -X ${goPackagePath}/cmd/tegola/cmd.Version=${version}" ]; + ldflags = [ "-s" "-w" "-X ${goPackagePath}/cmd/tegola/cmd.Version=${version}" ]; excludedPackages = [ "example" ]; diff --git a/pkgs/tools/admin/exoscale-cli/default.nix b/pkgs/tools/admin/exoscale-cli/default.nix index 0ffa33a1673ab..544ffcaf1ab31 100644 --- a/pkgs/tools/admin/exoscale-cli/default.nix +++ b/pkgs/tools/admin/exoscale-cli/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { goPackagePath = "github.com/exoscale/cli"; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.commit=${src.rev}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" ]; # ensures only the cli binary is built and we don't clutter bin/ with submodules subPackages = [ "." ]; diff --git a/pkgs/tools/filesystems/gcsfuse/default.nix b/pkgs/tools/filesystems/gcsfuse/default.nix index 759104b9c038d..4f739769807bc 100644 --- a/pkgs/tools/filesystems/gcsfuse/default.nix +++ b/pkgs/tools/filesystems/gcsfuse/default.nix @@ -20,7 +20,7 @@ buildGoPackage rec { ln -s $out/bin/mount_gcsfuse $out/bin/mount.fuse.gcsfuse ''; - buildFlagsArray = [ "-ldflags=-s -w -X main.gcsfuseVersion=${version}" ]; + ldflags = [ "-s" "-w" "-X main.gcsfuseVersion=${version}" ]; meta = with lib;{ description = "A user-space file system for interacting with Google Cloud Storage"; diff --git a/pkgs/tools/misc/cloud-sql-proxy/default.nix b/pkgs/tools/misc/cloud-sql-proxy/default.nix index 552ea140d6089..6f5a6ec25fbb2 100644 --- a/pkgs/tools/misc/cloud-sql-proxy/default.nix +++ b/pkgs/tools/misc/cloud-sql-proxy/default.nix @@ -16,7 +16,7 @@ buildGoPackage rec { goDeps = ./deps.nix; - buildFlagsArray = [ "-ldflags=" "-X main.versionString=${version}" ]; + ldflags = [ "-X main.versionString=${version}" ]; meta = with lib; { description = "An authenticating proxy for Second Generation Google Cloud SQL databases"; diff --git a/pkgs/tools/misc/dashing/default.nix b/pkgs/tools/misc/dashing/default.nix index 496639ec07a58..6dfa3f2b77964 100644 --- a/pkgs/tools/misc/dashing/default.nix +++ b/pkgs/tools/misc/dashing/default.nix @@ -15,7 +15,7 @@ buildGoPackage rec { goDeps = ./deps.nix; - buildFlagsArray = [ "-ldflags=-X main.version=${version}" ]; + ldflags = [ "-X main.version=${version}" ]; meta = with lib; { description = "A Dash Generator Script for Any HTML"; diff --git a/pkgs/tools/misc/gh-ost/default.nix b/pkgs/tools/misc/gh-ost/default.nix index 2e2d8ccfc14f0..16594f898b97e 100644 --- a/pkgs/tools/misc/gh-ost/default.nix +++ b/pkgs/tools/misc/gh-ost/default.nix @@ -13,7 +13,7 @@ buildGoPackage rec { goPackagePath = "github.com/github/gh-ost"; - buildFlagsArray = [ "-ldflags=-s -w -X main.AppVersion=${version} -X main.BuildDescribe=${src.rev}" ]; + ldflags = [ "-s" "-w" "-X main.AppVersion=${version}" "-X main.BuildDescribe=${src.rev}" ]; meta = with lib; { description = "Triggerless online schema migration solution for MySQL"; diff --git a/pkgs/tools/misc/git-town/default.nix b/pkgs/tools/misc/git-town/default.nix index 88d62b896df73..18f251fb72080 100644 --- a/pkgs/tools/misc/git-town/default.nix +++ b/pkgs/tools/misc/git-town/default.nix @@ -12,7 +12,7 @@ buildGoPackage rec { sha256 = "sha256-RmLDlTK+JO2KRLuLvO927W3WYdDlteBIpgTgDXh8lC8="; }; - buildFlagsArray = [ "-ldflags=-X github.com/git-town/git-town/src/cmd.version=v${version} -X github.com/git-town/git-town/src/cmd.buildDate=nix" ]; + ldflags = [ "-X github.com/git-town/git-town/src/cmd.version=v${version}" "-X github.com/git-town/git-town/src/cmd.buildDate=nix" ]; meta = with lib; { description = "Generic, high-level git support for git-flow workflows"; @@ -21,4 +21,3 @@ buildGoPackage rec { license = licenses.mit; }; } - diff --git a/pkgs/tools/misc/systrayhelper/default.nix b/pkgs/tools/misc/systrayhelper/default.nix index 03d8e58f8b02d..2453191d0cb83 100644 --- a/pkgs/tools/misc/systrayhelper/default.nix +++ b/pkgs/tools/misc/systrayhelper/default.nix @@ -16,13 +16,13 @@ buildGoPackage rec { # re date: https://github.com/NixOS/nixpkgs/pull/45997#issuecomment-418186178 # > .. keep the derivation deterministic. Otherwise, we would have to rebuild it every time. - buildFlagsArray = [ ''-ldflags= - -X main.version=v${version} - -X main.commit=${rev} - -X main.date="nix-byrev" - -s - -w - '' ]; + ldflags = [ + "-X main.version=v${version}" + "-X main.commit=${rev}" + "-X main.date=nix-byrev" + "-s" + "-w" + ]; nativeBuildInputs = [ pkg-config libappindicator-gtk3 ]; buildInputs = [ libappindicator-gtk3 ]; diff --git a/pkgs/tools/security/keycard-cli/default.nix b/pkgs/tools/security/keycard-cli/default.nix index 6e67358b675a2..93384df9b42ed 100644 --- a/pkgs/tools/security/keycard-cli/default.nix +++ b/pkgs/tools/security/keycard-cli/default.nix @@ -17,8 +17,7 @@ buildGoPackage rec { sha256 = "sha256-ejFvduZs3eWc6efr9o4pXb6qw2QWWQTtkTxF80vOGNU="; }; - buildFlagsArray = [ - "-ldflags=" + ldflags = [ "-X main.version=${version}" ]; diff --git a/pkgs/tools/security/minica/default.nix b/pkgs/tools/security/minica/default.nix index 49f1e2beb4db2..29574e39cd922 100644 --- a/pkgs/tools/security/minica/default.nix +++ b/pkgs/tools/security/minica/default.nix @@ -13,10 +13,9 @@ buildGoPackage rec { sha256 = "18518wp3dcjhf3mdkg5iwxqr3326n6jwcnqhyibphnb2a58ap7ny"; }; - buildFlagsArray = '' - -ldflags= - -X main.BuildVersion=${version} - ''; + ldflags = [ + "-X main.BuildVersion=${version}" + ]; meta = with lib; { description = "A simple tool for generating self signed certificates"; diff --git a/pkgs/tools/text/gucci/default.nix b/pkgs/tools/text/gucci/default.nix index 943b86d3b051b..c937e6c7ab16e 100644 --- a/pkgs/tools/text/gucci/default.nix +++ b/pkgs/tools/text/gucci/default.nix @@ -15,9 +15,9 @@ buildGoPackage rec { goDeps = ./deps.nix; - buildFlagsArray = '' - -ldflags=-X main.AppVersion=${version} - ''; + ldflags = [ + "-X main.AppVersion=${version}" + ]; meta = with lib; { description = "A simple CLI templating tool written in golang"; @@ -27,4 +27,3 @@ buildGoPackage rec { platforms = platforms.unix; }; } - |