Merge pull request #214002 from IndeedNotJames/gitea

gitea: fix build info
This commit is contained in:
Weijia Wang 2023-02-01 18:49:54 +01:00 committed by GitHub
commit e28a23e228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,20 +39,15 @@ buildGoModule rec {
buildInputs = lib.optional pamSupport pam;
preBuild =
let
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}"'
)
'';
tags = lib.optional pamSupport "pam"
++ lib.optionals sqliteSupport [ "sqlite" "sqlite_unlock_notify" ];
ldflags = [ "-s" "-w" ];
ldflags = [
"-s"
"-w"
"-X main.Version=${version}"
"-X 'main.Tags=${lib.concatStringsSep " " tags}'"
];
outputs = [ "out" "data" ];