From d662063a11582e06a29e3665f6595b5b827687e8 Mon Sep 17 00:00:00 2001 From: Guillaume Koenig Date: Tue, 15 Nov 2016 13:26:16 +0100 Subject: [PATCH] firefox: fix geolocation feature (#20425) Firefox uses a google API to perform geolocation. This API requires a key which must be given at build time. This commit adds the key from Chromium's derivation to Firefox. --- pkgs/applications/networking/browsers/firefox/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix index 5c3749f83fa..e0689206382 100644 --- a/pkgs/applications/networking/browsers/firefox/default.nix +++ b/pkgs/applications/networking/browsers/firefox/default.nix @@ -70,6 +70,7 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec { "--enable-jemalloc" "--disable-gconf" "--enable-default-toolkit=cairo-gtk2" + "--with-google-api-keyfile=ga" ] ++ lib.optional enableGTK3 "--enable-default-toolkit=cairo-gtk3" ++ (if debugBuild then [ "--enable-debug" "--enable-profiling" ] @@ -85,6 +86,11 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec { configureScript="$(realpath ./configure)" mkdir ../objdir cd ../objdir + + # 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" >ga ''; preInstall =