firefoxPackages: add `extraMakeFlags` to common builder, fix official branding handling

This commit is contained in:
SLNOS 2017-08-15 00:00:00 +00:00 committed by Jan Malakhovski
parent 344fbb5ddb
commit a681afb8f1
1 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,5 @@
{ pname, version, updateScript ? null
, src, patches ? [], extraConfigureFlags ? [], overrides ? {}, meta
, src, patches ? [], extraConfigureFlags ? [], extraMakeFlags ? [], overrides ? {}, meta
, isTorBrowserLike ? false }:
{ lib, stdenv, pkgconfig, pango, perl, python, zip, libIDL
@ -43,7 +43,7 @@
# option. However, in Firefox's case, those binaries may not be
# distributed without permission from the Mozilla Foundation, see
# http://www.mozilla.org/foundation/trademarks/.
, enableOfficialBranding ? false
, enableOfficialBranding ? isTorBrowserLike
}:
assert stdenv.cc ? libc && stdenv.cc.libc != null;
@ -158,6 +158,16 @@ stdenv.mkDerivation (rec {
++ lib.optional enableOfficialBranding "--enable-official-branding"
++ extraConfigureFlags;
preBuild = lib.optionalString (enableOfficialBranding && isTorBrowserLike) ''
buildFlagsArray=("MOZ_APP_DISPLAYNAME=Tor Browser")
'';
makeFlags = lib.optionals enableOfficialBranding [
"MOZILLA_OFFICIAL=1"
"BUILD_OFFICIAL=1"
]
++ extraMakeFlags;
enableParallelBuilding = true;
preInstall = ''