3
0
Fork 0
forked from mirrors/nixpkgs

gitea: fix build info

`ldflags =` took presence over the `-ldflags` in
`export buildFlagsArray`, introduced while migrating
from `buildGoPackage` to `buildGoModule` in #212929
This commit is contained in:
IndeedNotJames 2023-02-01 16:21:59 +01:00
parent 8f7a2b6bc5
commit abfabcc447
No known key found for this signature in database
GPG key ID: 0AD773CE46FD0F87

View file

@ -39,20 +39,15 @@ buildGoModule rec {
buildInputs = lib.optional pamSupport pam; buildInputs = lib.optional pamSupport pam;
preBuild = tags = lib.optional pamSupport "pam"
let ++ lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
tags = lib.optional pamSupport "pam"
++ lib.optional sqliteSupport "sqlite sqlite_unlock_notify";
tagsString = lib.concatStringsSep " " tags;
in
''
export buildFlagsArray=(
-tags="${tagsString}"
-ldflags='-X "main.Version=${version}" -X "main.Tags=${tagsString}"'
)
'';
ldflags = [ "-s" "-w" ]; ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X 'main.Tags=${lib.concatStringsSep " " tags}'"
];
outputs = [ "out" "data" ]; outputs = [ "out" "data" ];