From 42b9b8f7c8687cb26e69c3559e0e1346fb0e680f Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Thu, 1 Feb 2018 13:38:16 +0100 Subject: [PATCH] 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. --- pkgs/applications/networking/browsers/firefox/common.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 < $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"