Merge pull request #132973 from qowoz/buildflags-tags

This commit is contained in:
Sandro 2021-08-07 12:25:25 +02:00 committed by GitHub
commit 0e602c2516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 15 deletions

View File

@ -17,12 +17,12 @@ buildGoModule rec {
preBuild = ''
make assets
export buildFlagsArray=(
"-ldflags=-s -w -X github.com/writeas/writefreely.softwareVer=${version}"
"-tags='sqlite'"
)
'';
ldflags = [ "-s" "-w" "-X github.com/writeas/writefreely.softwareVer=${version}" ];
tags = [ "sqlite" ];
subPackages = [ "cmd/writefreely" ];
meta = with lib; {

View File

@ -28,11 +28,9 @@ buildGoModule rec {
buildInputs = lib.optionals stdenv.isLinux [ systemd ];
buildFlags = "-mod vendor" +
lib.optionalString stdenv.isLinux " -tags journald";
tags = lib.optionals stdenv.isLinux [ "journald" ];
buildFlagsArray = [
"-ldflags="
ldflags = [
"-X k8s.io/${pname}/pkg/version.version=v${version}"
];

View File

@ -23,8 +23,9 @@ buildGoModule rec {
buildInputs = lib.optional enableCmount (if stdenv.isDarwin then macfuse-stubs else fuse);
nativeBuildInputs = [ installShellFiles makeWrapper ];
buildFlagsArray = lib.optionals enableCmount [ "-tags=cmount" ]
++ [ "-ldflags=-s -w -X github.com/rclone/rclone/fs.Version=${version}" ];
tags = lib.optionals enableCmount [ "cmount" ];
ldflags = [ "-s" "-w" "-X github.com/rclone/rclone/fs.Version=${version}" ];
postInstall =
let

View File

@ -17,10 +17,10 @@ buildGoModule rec {
subPackages = [ "cmd/eksctl" ];
buildFlags = [ "-tags netgo" "-tags release" ];
tags = [ "netgo" "release" ];
buildFlagsArray = [
"-ldflags=-s -w -X github.com/weaveworks/eksctl/pkg/version.gitCommit=${src.rev} -X github.com/weaveworks/eksctl/pkg/version.buildDate=19700101-00:00:00"
ldflags = [
"-s" "-w" "-X github.com/weaveworks/eksctl/pkg/version.gitCommit=${src.rev}" "-X github.com/weaveworks/eksctl/pkg/version.buildDate=19700101-00:00:00"
];
nativeBuildInputs = [ installShellFiles ];

View File

@ -13,9 +13,9 @@ buildGoPackage rec {
sha256 = "sha256-1cprKpIFgM3+lUEHNvda34nJTH4Ch3LtTRq/Dp6QBQ8=";
};
buildFlags = [ "--tags" "release" ];
tags = [ "release" ];
buildFlagsArray = [ "-ldflags=-X main.Version=${version}" ];
ldflags = [ "-X main.Version=${version}" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 libiconv ];