@@ -11,7 +11,7 @@
1111, hunspell, libevent, libstartup_notification, libvpx
1212, icu, libpng, jemalloc, glib
1313, autoconf213, which, gnused, cargo, rustc, llvmPackages
14−, rust-cbindgen, nodejs
14+, rust-cbindgen, nodejs, nasm
1515, debugBuild ? false
1616
1717### optionals
@@ -121,6 +121,12 @@ stdenv.mkDerivation rec {
121121 ]
122122 ++ lib.optionals (!isTorBrowserLike) [ nspr nss ]
123123 ++ lib.optional (lib.versionOlder ffversion "61") hunspell
124+
125+ # >= 66 requires nasm for the AV1 lib dav1d
126+ # yasm can potentially be removed in future versions
127+ # https://bugzilla.mozilla.org/show_bug.cgi?id=1501796
128+ # https://groups.google.com/forum/#!msg/mozilla.dev.platform/o-8levmLU80/SM_zQvfzCQAJ
129+ ++ lib.optional (lib.versionAtLeast ffversion "66") nasm
124130 ++ lib.optional alsaSupport alsaLib
125131 ++ lib.optional pulseaudioSupport libpulseaudio # only headers are needed
126132 ++ lib.optional gtk3Support gtk3
@@ -188,7 +194,13 @@ stdenv.mkDerivation rec {
188194 # Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
189195 # please get your own set of keys.
190196 echo "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI" > $TMPDIR/ga
191− configureFlagsArray+=("--with-google-api-keyfile=$TMPDIR/ga")
197+ # 60.5+ & 66+ did split the google API key arguments: https://bugzilla.mozilla.org/show_bug.cgi?id=1531176
198+ ${if (lib.versionAtLeast ffversion "60.6" && lib.versionOlder ffversion "61") || (lib.versionAtLeast ffversion "66") then ''
199+ configureFlagsArray+=("--with-google-location-service-api-keyfile=$TMPDIR/ga")
200+ configureFlagsArray+=("--with-google-safebrowsing-api-keyfile=$TMPDIR/ga")
201+ '' else ''
202+ configureFlagsArray+=("--with-google-api-keyfile=$TMPDIR/ga")
203+ ''}
192204 '' + lib.optionalString (lib.versionOlder ffversion "58") ''
193205 cd obj-*
194206 ''