mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 13:19:10 +03:00
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:
parent
8f7a2b6bc5
commit
abfabcc447
@ -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" ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user