diff options
author | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-08-26 16:45:51 +1000 |
---|---|---|
committer | zowoq <59103226+zowoq@users.noreply.github.com> | 2021-08-26 21:35:06 +1000 |
commit | 13ea123c74cdcb33cdc376b16677044512615afa (patch) | |
tree | 927c311167547c8b17d63406095806f21533cf68 /pkgs/tools | |
parent | eada59b86b4925db45e705a6058eaca92485e939 (diff) |
treewide: buildFlagsArray -> ldflags
Diffstat (limited to 'pkgs/tools')
50 files changed, 91 insertions, 109 deletions
diff --git a/pkgs/tools/admin/aws-vault/default.nix b/pkgs/tools/admin/aws-vault/default.nix index c171601528176..afc493c3b6a1b 100644 --- a/pkgs/tools/admin/aws-vault/default.nix +++ b/pkgs/tools/admin/aws-vault/default.nix @@ -34,10 +34,9 @@ buildGoModule rec { subPackages = [ "." ]; # set the version. see: aws-vault's Makefile - buildFlagsArray = '' - -ldflags= - -X main.Version=v${version} - ''; + ldflags = [ + "-X main.Version=v${version}" + ]; doInstallCheck = true; diff --git a/pkgs/tools/admin/awsweeper/default.nix b/pkgs/tools/admin/awsweeper/default.nix index 0ff42ca20fcf6..7d1935415ab74 100644 --- a/pkgs/tools/admin/awsweeper/default.nix +++ b/pkgs/tools/admin/awsweeper/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-1u1mzANLlWduAQF1GUX7BJSyYlSZwNQISqKwbyRlGog="; - buildFlagsArray = [ "-ldflags=-s -w -X github.com/jckuester/awsweeper/internal.version=${version} -X github.com/jckuester/awsweeper/internal.commit=${src.rev} -X github.com/jckuester/awsweeper/internal.date=unknown" ]; + ldflags = [ "-s" "-w" "-X github.com/jckuester/awsweeper/internal.version=${version}" "-X github.com/jckuester/awsweeper/internal.commit=${src.rev}" "-X github.com/jckuester/awsweeper/internal.date=unknown" ]; doCheck = false; diff --git a/pkgs/tools/admin/chamber/default.nix b/pkgs/tools/admin/chamber/default.nix index 524970925ddc2..d69e96a45551b 100644 --- a/pkgs/tools/admin/chamber/default.nix +++ b/pkgs/tools/admin/chamber/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { vendorSha256 = "sha256-XpLLolxWu9aMp1cyG4dUQk4YtknbIRMmBUdSeyY4PNk="; - buildFlagsArray = [ "-ldflags=-s -w -X main.Version=v${version}" ]; + ldflags = [ "-s" "-w" "-X main.Version=v${version}" ]; meta = with lib; { description = diff --git a/pkgs/tools/admin/credhub-cli/default.nix b/pkgs/tools/admin/credhub-cli/default.nix index 0c71850f849e3..9cfb23ab9daa6 100644 --- a/pkgs/tools/admin/credhub-cli/default.nix +++ b/pkgs/tools/admin/credhub-cli/default.nix @@ -28,8 +28,7 @@ buildGoModule rec { vendorSha256 = null; - buildFlagsArray = [ - "-ldflags=" + ldflags = [ "-s" "-w" "-X code.cloudfoundry.org/credhub-cli/version.Version=${version}" diff --git a/pkgs/tools/admin/fioctl/default.nix b/pkgs/tools/admin/fioctl/default.nix index 6e20a32cf21ba..98e68c10fb9db 100644 --- a/pkgs/tools/admin/fioctl/default.nix +++ b/pkgs/tools/admin/fioctl/default.nix @@ -15,9 +15,9 @@ buildGoModule rec { runVend = true; - buildFlagsArray = '' - -ldflags=-s -w -X github.com/foundriesio/fioctl/subcommands/version.Commit=${src.rev} - ''; + ldflags = [ + "-s" "-w" "-X github.com/foundriesio/fioctl/subcommands/version.Commit=${src.rev}" + ]; meta = with lib; { description = "A simple CLI to manage your Foundries Factory "; diff --git a/pkgs/tools/admin/iamy/default.nix b/pkgs/tools/admin/iamy/default.nix index dd35da451ad87..6ee5f3f880bb7 100644 --- a/pkgs/tools/admin/iamy/default.nix +++ b/pkgs/tools/admin/iamy/default.nix @@ -15,9 +15,9 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [''-ldflags= - -X main.Version=v${version} -s -w - '']; + ldflags = [ + "-X main.Version=v${version}" "-s" "-w" + ]; meta = with lib; { description = "A cli tool for importing and exporting AWS IAM configuration to YAML files"; diff --git a/pkgs/tools/admin/lego/default.nix b/pkgs/tools/admin/lego/default.nix index 78f4b8cd2cb2f..685679467549f 100644 --- a/pkgs/tools/admin/lego/default.nix +++ b/pkgs/tools/admin/lego/default.nix @@ -17,8 +17,8 @@ buildGoModule rec { subPackages = [ "cmd/lego" ]; - buildFlagsArray = [ - "-ldflags=-X main.version=${version}" + ldflags = [ + "-X main.version=${version}" ]; meta = with lib; { diff --git a/pkgs/tools/admin/ssmsh/default.nix b/pkgs/tools/admin/ssmsh/default.nix index 3ed29af25fdcd..6c4785c81c59a 100644 --- a/pkgs/tools/admin/ssmsh/default.nix +++ b/pkgs/tools/admin/ssmsh/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = true; - buildFlagsArray = [ "-ldflags=-w -s -X main.Version=${version}" ]; + ldflags = [ "-w" "-s" "-X main.Version=${version}" ]; meta = with lib; { homepage = "https://github.com/bwhaley/ssmsh"; diff --git a/pkgs/tools/backup/kopia/default.nix b/pkgs/tools/backup/kopia/default.nix index 32f051f5ad916..ad113ed615ef7 100644 --- a/pkgs/tools/backup/kopia/default.nix +++ b/pkgs/tools/backup/kopia/default.nix @@ -17,11 +17,10 @@ buildGoModule rec { subPackages = [ "." ]; - buildFlagsArray = '' - -ldflags= - -X github.com/kopia/kopia/repo.BuildVersion=${version} - -X github.com/kopia/kopia/repo.BuildInfo=${src.rev} - ''; + ldflags = [ + "-X github.com/kopia/kopia/repo.BuildVersion=${version}" + "-X github.com/kopia/kopia/repo.BuildInfo=${src.rev}" + ]; meta = with lib; { homepage = "https://kopia.io"; diff --git a/pkgs/tools/filesystems/gocryptfs/default.nix b/pkgs/tools/filesystems/gocryptfs/default.nix index 4d901d688908e..29750531db20b 100644 --- a/pkgs/tools/filesystems/gocryptfs/default.nix +++ b/pkgs/tools/filesystems/gocryptfs/default.nix @@ -37,12 +37,11 @@ buildGoModule rec { propagatedBuildInputs = [ libfido2 ]; - buildFlagsArray = '' - -ldflags= - -X main.GitVersion=${version} - -X main.GitVersionFuse=[vendored] - -X main.BuildDate=unknown - ''; + ldflags = [ + "-X main.GitVersion=${version}" + "-X main.GitVersionFuse=[vendored]" + "-X main.BuildDate=unknown" + ]; subPackages = [ "." "gocryptfs-xray" "contrib/statfs" ]; diff --git a/pkgs/tools/misc/chezmoi/default.nix b/pkgs/tools/misc/chezmoi/default.nix index ff9e7a0013336..a60a84475b063 100644 --- a/pkgs/tools/misc/chezmoi/default.nix +++ b/pkgs/tools/misc/chezmoi/default.nix @@ -15,8 +15,8 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ - "-ldflags=-s -w -X main.version=${version} -X main.builtBy=nixpkgs" + ldflags = [ + "-s" "-w" "-X main.version=${version}" "-X main.builtBy=nixpkgs" ]; nativeBuildInputs = [ installShellFiles ]; diff --git a/pkgs/tools/misc/duf/default.nix b/pkgs/tools/misc/duf/default.nix index 076eb33fbb19c..e95edb08b84ab 100644 --- a/pkgs/tools/misc/duf/default.nix +++ b/pkgs/tools/misc/duf/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "153z0ccd556c0wpnxgyjq7m0c4y2z6fxsqq2p77kly9nr8cpzdb9"; - buildFlagsArray = [ "-ldflags=-s -w -X=main.Version=${version}" ]; + ldflags = [ "-s" "-w" "-X=main.Version=${version}" ]; meta = with lib; { homepage = "https://github.com/muesli/duf/"; diff --git a/pkgs/tools/misc/goreleaser/default.nix b/pkgs/tools/misc/goreleaser/default.nix index 35fc8343b5a1e..62c184d6be595 100644 --- a/pkgs/tools/misc/goreleaser/default.nix +++ b/pkgs/tools/misc/goreleaser/default.nix @@ -13,8 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-7I/955dPHV8Rkp6VevkebkZaNtSlbzIsGc8qFjtcMXk="; - buildFlagsArray = [ - "-ldflags=" + ldflags = [ "-s" "-w" "-X main.version=${version}" diff --git a/pkgs/tools/misc/gotify-cli/default.nix b/pkgs/tools/misc/gotify-cli/default.nix index 36a7055f875c9..05a93b44b94ed 100644 --- a/pkgs/tools/misc/gotify-cli/default.nix +++ b/pkgs/tools/misc/gotify-cli/default.nix @@ -19,8 +19,8 @@ buildGoModule rec { mv $out/bin/cli $out/bin/gotify ''; - buildFlagsArray = [ - "-ldflags=-X main.Version=${version} -X main.Commit=${version} -X main.BuildDate=1970-01-01" + ldflags = [ + "-X main.Version=${version}" "-X main.Commit=${version}" "-X main.BuildDate=1970-01-01" ]; meta = with lib; { diff --git a/pkgs/tools/misc/lf/default.nix b/pkgs/tools/misc/lf/default.nix index 8aa8e9a663b74..b135ed061dee7 100644 --- a/pkgs/tools/misc/lf/default.nix +++ b/pkgs/tools/misc/lf/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles ]; - buildFlagsArray = [ "-ldflags=-s -w -X main.gVersion=r${version}" ]; + ldflags = [ "-s" "-w" "-X main.gVersion=r${version}" ]; postInstall = '' install -D --mode=444 lf.desktop $out/share/applications/lf.desktop diff --git a/pkgs/tools/misc/microplane/default.nix b/pkgs/tools/misc/microplane/default.nix index 26ae9f4f16dbf..a44ae344bf593 100644 --- a/pkgs/tools/misc/microplane/default.nix +++ b/pkgs/tools/misc/microplane/default.nix @@ -13,9 +13,9 @@ buildGoModule rec { vendorSha256 = "sha256-PqSjSFTVrIsQ065blIxZ9H/ARku6BEcnjboH+0K0G14="; - buildFlagsArray = '' - -ldflags=-s -w -X main.version=${version} - ''; + ldflags = [ + "-s" "-w" "-X main.version=${version}" + ]; postInstall = '' ln -s $out/bin/microplane $out/bin/mp diff --git a/pkgs/tools/misc/pgcenter/default.nix b/pkgs/tools/misc/pgcenter/default.nix index c5ca7e8c911bf..ac1c0bd356d2d 100644 --- a/pkgs/tools/misc/pgcenter/default.nix +++ b/pkgs/tools/misc/pgcenter/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { subPackages = [ "cmd" ]; - buildFlagsArray = [ "-ldflags=-w -s -X main.gitTag=${src.rev} -X main.gitCommit=${src.rev} -X main.gitBranch=master" ]; + ldflags = [ "-w" "-s" "-X main.gitTag=${src.rev}" "-X main.gitCommit=${src.rev}" "-X main.gitBranch=master" ]; postInstall = '' mv $out/bin/cmd $out/bin/pgcenter diff --git a/pkgs/tools/misc/pgmetrics/default.nix b/pkgs/tools/misc/pgmetrics/default.nix index 955444ff8c87c..c5a240f714ea7 100644 --- a/pkgs/tools/misc/pgmetrics/default.nix +++ b/pkgs/tools/misc/pgmetrics/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { homepage = "https://pgmetrics.io/"; diff --git a/pkgs/tools/misc/pistol/default.nix b/pkgs/tools/misc/pistol/default.nix index 52c83abdf6884..6d91a54e56dc2 100644 --- a/pkgs/tools/misc/pistol/default.nix +++ b/pkgs/tools/misc/pistol/default.nix @@ -35,7 +35,7 @@ buildGoModule rec { installManPage pistol.1 ''; - buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.Version=${version}" ]; meta = with lib; { description = "General purpose file previewer designed for Ranger, Lf to make scope.sh redundant"; diff --git a/pkgs/tools/misc/tfk8s/default.nix b/pkgs/tools/misc/tfk8s/default.nix index 086a05c90169d..8ca102444a9d4 100644 --- a/pkgs/tools/misc/tfk8s/default.nix +++ b/pkgs/tools/misc/tfk8s/default.nix @@ -15,8 +15,7 @@ buildGoModule rec { vendorSha256 = "sha256-eLPmghs05pMMtys97Ja7YGdVMZmMmiaFeMwzaWNxW0I="; runVend = true; - buildFlagsArray = [ - "-ldflags=" + ldflags = [ "-s" "-w" "-X main.toolVersion=${tag}" diff --git a/pkgs/tools/misc/vsh/default.nix b/pkgs/tools/misc/vsh/default.nix index 13a3df4d6b943..416dd4bfcc136 100644 --- a/pkgs/tools/misc/vsh/default.nix +++ b/pkgs/tools/misc/vsh/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { vendorSha256 = null; # make sure version gets set at compile time - buildFlagsArray = [ "-ldflags=-s -w -X main.vshVersion=v${version}" ]; + ldflags = [ "-s" "-w" "-X main.vshVersion=v${version}" ]; meta = with lib; { description = "HashiCorp Vault interactive shell"; diff --git a/pkgs/tools/networking/cassowary/default.nix b/pkgs/tools/networking/cassowary/default.nix index 527ecfbf98d3a..6280b923ec0c8 100644 --- a/pkgs/tools/networking/cassowary/default.nix +++ b/pkgs/tools/networking/cassowary/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { homepage = "https://github.com/rogerwelin/cassowary"; diff --git a/pkgs/tools/networking/chisel/default.nix b/pkgs/tools/networking/chisel/default.nix index 5d82a549e889f..9df5625c2355c 100644 --- a/pkgs/tools/networking/chisel/default.nix +++ b/pkgs/tools/networking/chisel/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { vendorSha256 = "sha256-GzsQ6LXxe9UQc13XbsYFOWPe0EzlyHechchKc6xDkAc="; - buildFlagsArray = [ "-ldflags=-s -w -X github.com/jpillora/chisel/share.BuildVersion=${version}" ]; + ldflags = [ "-s" "-w" "-X github.com/jpillora/chisel/share.BuildVersion=${version}" ]; # tests require access to the network doCheck = false; diff --git a/pkgs/tools/networking/clash/default.nix b/pkgs/tools/networking/clash/default.nix index 61e529dc8729d..221a6c280b26d 100644 --- a/pkgs/tools/networking/clash/default.nix +++ b/pkgs/tools/networking/clash/default.nix @@ -15,8 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ - "-ldflags=" + ldflags = [ "-X github.com/Dreamacro/clash/constant.Version=${version}" ]; diff --git a/pkgs/tools/networking/gobgp/default.nix b/pkgs/tools/networking/gobgp/default.nix index 98925489e5482..6ba0752222ac2 100644 --- a/pkgs/tools/networking/gobgp/default.nix +++ b/pkgs/tools/networking/gobgp/default.nix @@ -17,10 +17,9 @@ buildGoModule rec { export CGO_ENABLED=0 ''; - buildFlagsArray = '' - -ldflags= - -s -w -extldflags '-static' - ''; + ldflags = [ + "-s" "-w" "-extldflags '-static'" + ]; subPackages = [ "cmd/gobgp" ]; diff --git a/pkgs/tools/networking/grpcui/default.nix b/pkgs/tools/networking/grpcui/default.nix index a9fb7c823f9ed..1fa47ba917fc8 100644 --- a/pkgs/tools/networking/grpcui/default.nix +++ b/pkgs/tools/networking/grpcui/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { subPackages = [ "cmd/grpcui" ]; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "An interactive web UI for gRPC, along the lines of postman"; diff --git a/pkgs/tools/networking/grpcurl/default.nix b/pkgs/tools/networking/grpcurl/default.nix index 734a751daf09d..e6cd09dc2fd71 100644 --- a/pkgs/tools/networking/grpcurl/default.nix +++ b/pkgs/tools/networking/grpcurl/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { vendorSha256 = "sha256-nl8vKVhUMSO20qCDyhNkU5cghNy8vIFqSBvLk59nbWg="; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers"; diff --git a/pkgs/tools/networking/nebula/default.nix b/pkgs/tools/networking/nebula/default.nix index 06615ae25fae7..2aec2fb50c76c 100644 --- a/pkgs/tools/networking/nebula/default.nix +++ b/pkgs/tools/networking/nebula/default.nix @@ -17,7 +17,7 @@ buildGoModule rec { subPackages = [ "cmd/nebula" "cmd/nebula-cert" ]; - buildFlagsArray = [ "-ldflags=" "-X main.Build=${version}" ]; + ldflags = [ "-X main.Build=${version}" ]; meta = with lib; { description = "A scalable overlay networking tool with a focus on performance, simplicity and security"; diff --git a/pkgs/tools/networking/shadowfox/default.nix b/pkgs/tools/networking/shadowfox/default.nix index e6b1c823eb88a..a75936a15204e 100644 --- a/pkgs/tools/networking/shadowfox/default.nix +++ b/pkgs/tools/networking/shadowfox/default.nix @@ -15,8 +15,8 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ - "-ldflags=-X main.tag=v${version}" + ldflags = [ + "-X main.tag=v${version}" ]; meta = with lib; { diff --git a/pkgs/tools/networking/telepresence2/default.nix b/pkgs/tools/networking/telepresence2/default.nix index 2cbe5fd918497..e7ae903e8682b 100644 --- a/pkgs/tools/networking/telepresence2/default.nix +++ b/pkgs/tools/networking/telepresence2/default.nix @@ -13,9 +13,9 @@ buildGoModule rec { vendorSha256 = "1snmp461h8driy1w1xggk669yxl0sjl1m9pbqm7dwk44yb94zi1q"; - buildFlagsArray = '' - -ldflags=-s -w -X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev} - ''; + ldflags = [ + "-s" "-w" "-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=${src.rev}" + ]; subPackages = [ "cmd/telepresence" ]; diff --git a/pkgs/tools/networking/termshark/default.nix b/pkgs/tools/networking/termshark/default.nix index 7b9a3c42d6060..d35e70ad52e4a 100644 --- a/pkgs/tools/networking/termshark/default.nix +++ b/pkgs/tools/networking/termshark/default.nix @@ -22,10 +22,9 @@ buildGoModule rec { wrapProgram $out/bin/termshark --prefix PATH : ${lib.makeBinPath [ wireshark-cli ]} ''; - buildFlagsArray = '' - -ldflags= - -X github.com/gcla/termshark.Version=${version} - ''; + ldflags = [ + "-X github.com/gcla/termshark.Version=${version}" + ]; meta = with lib; { homepage = "https://termshark.io/"; diff --git a/pkgs/tools/networking/yggdrasil/default.nix b/pkgs/tools/networking/yggdrasil/default.nix index 506869238e57b..874205f592bd0 100644 --- a/pkgs/tools/networking/yggdrasil/default.nix +++ b/pkgs/tools/networking/yggdrasil/default.nix @@ -22,12 +22,11 @@ buildGoModule rec { subPackages = [ "cmd/yggdrasil" "cmd/yggdrasilctl" ]; - buildFlagsArray = '' - -ldflags= - -X github.com/yggdrasil-network/yggdrasil-go/src/version.buildVersion=${version} - -X github.com/yggdrasil-network/yggdrasil-go/src/version.buildName=${pname} - -s -w - ''; + ldflags = [ + "-X github.com/yggdrasil-network/yggdrasil-go/src/version.buildVersion=${version}" + "-X github.com/yggdrasil-network/yggdrasil-go/src/version.buildName=${pname}" + "-s" "-w" + ]; passthru.tests.basic = nixosTests.yggdrasil; diff --git a/pkgs/tools/package-management/holo-build/default.nix b/pkgs/tools/package-management/holo-build/default.nix index 20e3b555fd2f5..847c8a726d0f3 100644 --- a/pkgs/tools/package-management/holo-build/default.nix +++ b/pkgs/tools/package-management/holo-build/default.nix @@ -24,7 +24,7 @@ buildGoModule rec { subPackages = [ "src/holo-build" ]; - buildFlagsArray = [ "-ldflags=-s -w -X github.com/holocm/holo-build/src/holo-build/common.version=${version}" ]; + ldflags = [ "-s" "-w" "-X github.com/holocm/holo-build/src/holo-build/common.version=${version}" ]; postBuild = '' make build/man/holo-build.8 VERSION=${version} diff --git a/pkgs/tools/package-management/morph/default.nix b/pkgs/tools/package-management/morph/default.nix index 56d824059f532..e7b6b3adf1f27 100644 --- a/pkgs/tools/package-management/morph/default.nix +++ b/pkgs/tools/package-management/morph/default.nix @@ -15,11 +15,9 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper go-bindata ]; - buildFlagsArray = '' - -ldflags= - -X - main.version=${version} - ''; + ldflags = [ + "-X main.version=${version}" + ]; postPatch = '' go-bindata -pkg assets -o assets/assets.go data/ diff --git a/pkgs/tools/package-management/nfpm/default.nix b/pkgs/tools/package-management/nfpm/default.nix index 69d2f0d29f787..9331bdba68438 100644 --- a/pkgs/tools/package-management/nfpm/default.nix +++ b/pkgs/tools/package-management/nfpm/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "A simple deb and rpm packager written in Go"; diff --git a/pkgs/tools/security/aws-iam-authenticator/default.nix b/pkgs/tools/security/aws-iam-authenticator/default.nix index d9f4f4a017355..476d248c4343f 100644 --- a/pkgs/tools/security/aws-iam-authenticator/default.nix +++ b/pkgs/tools/security/aws-iam-authenticator/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { deleteVendor = true; vendorSha256 = "+Z8sENIMWXP29Piwb/W6i7UdNXVq6ZnO7AZbSaUYCME="; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=v${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=v${version}" ]; subPackages = [ "cmd/aws-iam-authenticator" ]; diff --git a/pkgs/tools/security/cfssl/default.nix b/pkgs/tools/security/cfssl/default.nix index 6ef07c2c355be..1e95d1d6f2f95 100644 --- a/pkgs/tools/security/cfssl/default.nix +++ b/pkgs/tools/security/cfssl/default.nix @@ -34,11 +34,10 @@ buildGoModule rec { popd ''; - buildFlagsArray = '' - -ldflags= - -s -w - -X github.com/cloudflare/cfssl/cli/version.version=v${version} - ''; + ldflags = [ + "-s" "-w" + "-X github.com/cloudflare/cfssl/cli/version.version=v${version}" + ]; meta = with lib; { homepage = "https://cfssl.org/"; diff --git a/pkgs/tools/security/doppler/default.nix b/pkgs/tools/security/doppler/default.nix index ad49251aae861..18ca909cd5e0c 100644 --- a/pkgs/tools/security/doppler/default.nix +++ b/pkgs/tools/security/doppler/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-yb7L4GSKtlwagwdxBMd5aSk9fre1NKKsy6CM4Iv2ya8="; - buildFlagsArray = "-ldflags=-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}"; + ldflags = [ "-X github.com/DopplerHQ/cli/pkg/version.ProgramVersion=v${version}" ]; postInstall = '' mv $out/bin/cli $out/bin/doppler diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 358acf376b48d..9e56b4c1a4bb0 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -30,7 +30,7 @@ buildGoModule rec { doCheck = false; - 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}" ]; wrapperPath = lib.makeBinPath ( [ diff --git a/pkgs/tools/security/gopass/git-credential.nix b/pkgs/tools/security/gopass/git-credential.nix index fb0da2c1a0936..0b15e9b023537 100644 --- a/pkgs/tools/security/gopass/git-credential.nix +++ b/pkgs/tools/security/gopass/git-credential.nix @@ -22,11 +22,9 @@ buildGoModule rec { nativeBuildInputs = [ makeWrapper ]; - preBuild = '' - 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}" + ]; postFixup = '' wrapProgram $out/bin/git-credential-gopass --prefix PATH : "${lib.makeBinPath [ gopass ]}" diff --git a/pkgs/tools/security/gopass/jsonapi.nix b/pkgs/tools/security/gopass/jsonapi.nix index e060adbf5bcf9..c138bde2cc3c6 100644 --- a/pkgs/tools/security/gopass/jsonapi.nix +++ b/pkgs/tools/security/gopass/jsonapi.nix @@ -23,11 +23,9 @@ buildGoModule rec { nativeBuildInputs = [ installShellFiles makeWrapper ]; - preBuild = '' - 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}" + ]; postFixup = '' wrapProgram $out/bin/gopass-jsonapi --prefix PATH : "${lib.makeBinPath [ gopass ]}" diff --git a/pkgs/tools/security/saml2aws/default.nix b/pkgs/tools/security/saml2aws/default.nix index 8ee2c9a4c4e48..55862623f494f 100644 --- a/pkgs/tools/security/saml2aws/default.nix +++ b/pkgs/tools/security/saml2aws/default.nix @@ -20,9 +20,9 @@ buildGoModule rec { subPackages = [ "." "cmd/saml2aws" ]; - buildFlagsArray = '' - -ldflags=-X main.Version=${version} - ''; + ldflags = [ + "-X main.Version=${version}" + ]; meta = with lib; { description = "CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP"; diff --git a/pkgs/tools/security/step-ca/default.nix b/pkgs/tools/security/step-ca/default.nix index 63291946e38c2..9b645dcba9275 100644 --- a/pkgs/tools/security/step-ca/default.nix +++ b/pkgs/tools/security/step-ca/default.nix @@ -22,7 +22,7 @@ buildGoModule rec { vendorSha256 = "sha256-cFuLW0qkI/l/TvYwQZA2bLlWYjs1hdbQJ5jU7xiuFZI="; - buildFlagsArray = [ "-ldflags=-buildid=" ]; + ldflags = [ "-buildid=" ]; nativeBuildInputs = lib.optionals hsmSupport [ pkg-config ]; diff --git a/pkgs/tools/security/subjs/default.nix b/pkgs/tools/security/subjs/default.nix index 1b7986c0a77a2..65d3f18be7944 100644 --- a/pkgs/tools/security/subjs/default.nix +++ b/pkgs/tools/security/subjs/default.nix @@ -16,7 +16,7 @@ buildGoModule rec { vendorSha256 = "1y01k8pvv7y9zb15wbk068cvkx0g83484jak2dvcvghqcf5j1fr1"; - buildFlagsArray = [ "-ldflags=-s -w -X main.AppVersion=${version}" ]; + ldflags = [ "-s" "-w" "-X main.AppVersion=${version}" ]; meta = with lib; { description = "Fetcher for Javascript files"; diff --git a/pkgs/tools/system/ctop/default.nix b/pkgs/tools/system/ctop/default.nix index 45cbca172fa71..36dfd02c33f60 100644 --- a/pkgs/tools/system/ctop/default.nix +++ b/pkgs/tools/system/ctop/default.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version} -X main.build=v${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.build=v${version}" ]; meta = with lib; { description = "Top-like interface for container metrics"; diff --git a/pkgs/tools/system/hostctl/default.nix b/pkgs/tools/system/hostctl/default.nix index 3c366d56fca9d..fb3a293a80fd8 100644 --- a/pkgs/tools/system/hostctl/default.nix +++ b/pkgs/tools/system/hostctl/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-rGDWrivIdl5FTu/kNR8nAfE2+1hE4cm3uDg7oBobE9M="; - buildFlagsArray = [ "-ldflags=-s -w -X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" ]; + ldflags = [ "-s" "-w" "-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" ]; nativeBuildInputs = [ installShellFiles ]; postInstall = '' @@ -33,4 +33,3 @@ buildGoModule rec { maintainers = with maintainers; [ blaggacao ]; }; } - diff --git a/pkgs/tools/system/netdata/go.d.plugin.nix b/pkgs/tools/system/netdata/go.d.plugin.nix index be6e8f2676379..53ab6d6982d63 100644 --- a/pkgs/tools/system/netdata/go.d.plugin.nix +++ b/pkgs/tools/system/netdata/go.d.plugin.nix @@ -15,7 +15,7 @@ buildGoModule rec { doCheck = false; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; postInstall = '' mkdir -p $out/lib/netdata/conf.d diff --git a/pkgs/tools/text/mark/default.nix b/pkgs/tools/text/mark/default.nix index 04b08488ee91c..653af8b79692b 100644 --- a/pkgs/tools/text/mark/default.nix +++ b/pkgs/tools/text/mark/default.nix @@ -13,7 +13,7 @@ buildGoModule rec { vendorSha256 = "sha256-y3Q8UebNbLy1jmxUC37mv+2l8dCU3b/Fk8XHn5u57p0="; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { description = "A tool for syncing your markdown documentation with Atlassian Confluence pages"; diff --git a/pkgs/tools/text/vale/default.nix b/pkgs/tools/text/vale/default.nix index a665e35fdd551..d5c64aa9f7b2a 100644 --- a/pkgs/tools/text/vale/default.nix +++ b/pkgs/tools/text/vale/default.nix @@ -21,7 +21,7 @@ buildGoModule rec { cp -r styles $data/share/vale ''; - buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + ldflags = [ "-s" "-w" "-X main.version=${version}" ]; meta = with lib; { homepage = "https://docs.errata.ai/vale/about"; diff --git a/pkgs/tools/virtualization/shipyard/default.nix b/pkgs/tools/virtualization/shipyard/default.nix index cd8a4c36a9202..9c67b5462bbfd 100644 --- a/pkgs/tools/virtualization/shipyard/default.nix +++ b/pkgs/tools/virtualization/shipyard/default.nix @@ -12,8 +12,8 @@ buildGoModule rec { }; vendorSha256 = "sha256-tTkPFftPDNXafIjAjNg6V6e/+2S/v5Do/YyAXPaGIqA="; - buildFlagsArray = [ - "-ldflags=-s -w -X main.version=${version}" + ldflags = [ + "-s" "-w" "-X main.version=${version}" ]; # Tests require a large variety of tools and resources to run including |