forked from mirrors/nixpkgs
Merge pull request #58584 from srhb/gitea-tags-fix
gitea: Fix sqlite support and baked-in tags
This commit is contained in:
commit
b61fba0ce9
|
@ -35,12 +35,15 @@ buildGoPackage rec {
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ optional pamSupport pam;
|
++ optional pamSupport pam;
|
||||||
|
|
||||||
buildFlags = optional sqliteSupport "-tags sqlite"
|
preBuild = let
|
||||||
++ optional pamSupport "-tags pam";
|
tags = optional pamSupport "pam"
|
||||||
buildFlagsArray = ''
|
++ optional sqliteSupport "sqlite";
|
||||||
-ldflags=
|
tagsString = concatStringsSep " " tags;
|
||||||
-X=main.Version=${version}
|
in ''
|
||||||
${optionalString sqliteSupport "-X=main.Tags=sqlite"}
|
export buildFlagsArray=(
|
||||||
|
-tags="${tagsString}"
|
||||||
|
-ldflags='-X "main.Version=${version}" -X "main.Tags=${tagsString}"'
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "bin" "out" "data" ];
|
outputs = [ "bin" "out" "data" ];
|
||||||
|
|
Loading…
Reference in a new issue