3
0
Fork 0
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:
Maximilian Bosch 2019-03-30 18:07:50 +01:00 committed by GitHub
commit b61fba0ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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" ];