summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/firefox
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2018-02-01 13:38:16 +0100
committerAndreas Rammhold <andreas@rammhold.de>2018-02-01 13:38:16 +0100
commit42b9b8f7c8687cb26e69c3559e0e1346fb0e680f (patch)
tree1617b8627ede7be22ec0733227a8679c69957971 /pkgs/applications/networking/browsers/firefox
parentf92fd9554e680d04038762093d70ef416c70e1e6 (diff)
downloadnixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar.gz
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar.bz2
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar.lz
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar.xz
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.tar.zst
nixlib-42b9b8f7c8687cb26e69c3559e0e1346fb0e680f.zip
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.
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox')
-rw-r--r--pkgs/applications/networking/browsers/firefox/common.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix
index 13d0953d4bd7..91b86a18375c 100644
--- a/pkgs/applications/networking/browsers/firefox/common.nix
+++ b/pkgs/applications/networking/browsers/firefox/common.nix
@@ -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"