From 7b6430984bdd885e1ae74c280d15c652c84b14ac Mon Sep 17 00:00:00 2001 From: Sarah Brofeldt Date: Sat, 30 Mar 2019 14:56:55 +0100 Subject: [PATCH] gitea: Fix sqlite support and baked-in tags --- .../version-management/gitea/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/version-management/gitea/default.nix b/pkgs/applications/version-management/gitea/default.nix index 527b3a1698b8..38aa63c1ab07 100644 --- a/pkgs/applications/version-management/gitea/default.nix +++ b/pkgs/applications/version-management/gitea/default.nix @@ -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" ];