gitea: Fix sqlite support and baked-in tags
This commit is contained in:
parent
5c669af4ab
commit
7b6430984b
1 changed files with 9 additions and 6 deletions
|
@ -35,12 +35,15 @@ buildGoPackage rec {
|
|||
nativeBuildInputs = [ makeWrapper ]
|
||||
++ optional pamSupport pam;
|
||||
|
||||
buildFlags = optional sqliteSupport "-tags sqlite"
|
||||
++ optional pamSupport "-tags pam";
|
||||
buildFlagsArray = ''
|
||||
-ldflags=
|
||||
-X=main.Version=${version}
|
||||
${optionalString sqliteSupport "-X=main.Tags=sqlite"}
|
||||
preBuild = let
|
||||
tags = optional pamSupport "pam"
|
||||
++ optional sqliteSupport "sqlite";
|
||||
tagsString = concatStringsSep " " tags;
|
||||
in ''
|
||||
export buildFlagsArray=(
|
||||
-tags="${tagsString}"
|
||||
-ldflags='-X "main.Version=${version}" -X "main.Tags=${tagsString}"'
|
||||
)
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "out" "data" ];
|
||||
|
|
Loading…
Reference in a new issue