firefox{-esr,}: fix failing build due to the google-api-key
Since firefox 58.0.1 the google api key is now stored at an absolute path ($TMPDIR/ga). Since variable expansion in `configureFlags` does not really work (as expected) the build started failing when using the legacy firefox build system. With the newer `./mach` based builds firefox reads the configure flags from `.mozconfig` instead. This commit moves the `with-google-api-keyfile=` setting into the `preConfigure` phase where we can properly expand `$TMPDIR` into whatever the path is.
This commit is contained in:
parent
f92fd9554e
commit
42b9b8f7c8
@ -104,12 +104,14 @@ stdenv.mkDerivation (rec {
|
||||
'' + lib.optionalString (stdenv.lib.versionAtLeast version "58.0.0") ''
|
||||
cat >.mozconfig <<END_MOZCONFIG
|
||||
${lib.concatStringsSep "\n" (map (flag: "ac_add_options ${flag}") configureFlags)}
|
||||
${lib.optionalString googleAPISupport "ac_add_options --with-google-api-keyfile=$TMPDIR/ga"}
|
||||
END_MOZCONFIG
|
||||
'' + lib.optionalString googleAPISupport ''
|
||||
# Google API key used by Chromium and Firefox.
|
||||
# Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
|
||||
# please get your own set of keys.
|
||||
echo "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI" > $TMPDIR/ga
|
||||
configureFlagsArray+=("--with-google-api-keyfile=$TMPDIR/ga")
|
||||
'' + ''
|
||||
# this will run autoconf213
|
||||
${if (stdenv.lib.versionAtLeast version "58.0.0") then "./mach configure" else "make -f client.mk configure-files"}
|
||||
@ -184,7 +186,6 @@ stdenv.mkDerivation (rec {
|
||||
++ flag gssSupport "negotiateauth"
|
||||
++ lib.optional (!ffmpegSupport) "--disable-gstreamer"
|
||||
++ flag webrtcSupport "webrtc"
|
||||
++ lib.optional googleAPISupport "--with-google-api-keyfile=$TMPDIR/ga"
|
||||
++ flag crashreporterSupport "crashreporter"
|
||||
++ lib.optional drmSupport "--enable-eme=widevine"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user