From 672ccbddd5da435ffabd58184701fdc48e9d4bb3 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 30 Apr 2025 23:49:30 +0200 Subject: [PATCH] buildMozillaMach: default to beacondb for location data Mozilla Location Services was retired and our Google API keys have not worked in years. This is also the new default for geoclue2 in nixpkgs. --- .../networking/browsers/firefox/common.nix | 24 +++---------------- .../networking/browsers/floorp/default.nix | 3 +-- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 4a9b4ec0d059..5eb37f04dce6 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -155,8 +155,6 @@ in !privacySupport && !stdenv.hostPlatform.isRiscV && !stdenv.hostPlatform.isMusl, curl, geolocationSupport ? !privacySupport, - googleAPISupport ? geolocationSupport, - mlsAPISupport ? geolocationSupport, webrtcSupport ? !privacySupport, # digital rights managemewnt @@ -250,10 +248,10 @@ let } ); - defaultPrefs = { + defaultPrefs = lib.optionalAttrs geolocationSupport { "geo.provider.network.url" = { - value = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; - reason = "Use MLS by default for geolocation, since our Google API Keys are not working"; + value = "https://api.beacondb.net/v1/geolocate"; + reason = "We have no Google API keys and Mozilla Location Services were retired."; }; }; @@ -473,22 +471,6 @@ buildStdenv.mkDerivation { } fi '' - + 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 at https://www.chromium.org/developers/how-tos/api-keys/. - echo "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI" > $TMPDIR/google-api-key - # 60.5+ & 66+ did split the google API key arguments: https://bugzilla.mozilla.org/show_bug.cgi?id=1531176 - configureFlagsArray+=("--with-google-location-service-api-keyfile=$TMPDIR/google-api-key") - configureFlagsArray+=("--with-google-safebrowsing-api-keyfile=$TMPDIR/google-api-key") - '' - + lib.optionalString mlsAPISupport '' - # Mozilla Location services API key - # Note: These are for NixOS/nixpkgs use ONLY. For your own distribution, - # please get your own set of keys at https://location.services.mozilla.com/api. - echo "dfd7836c-d458-4917-98bb-421c82d3c8a0" > $TMPDIR/mls-api-key - configureFlagsArray+=("--with-mozilla-api-keyfile=$TMPDIR/mls-api-key") - '' + lib.optionalString (enableOfficialBranding && !stdenv.hostPlatform.is32bit) '' export MOZILLA_OFFICIAL=1 '' diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix index 9827f278e44e..79827619ff63 100644 --- a/pkgs/applications/networking/browsers/floorp/default.nix +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -66,8 +66,7 @@ privacySupport = true; webrtcSupport = true; enableOfficialBranding = false; - googleAPISupport = true; - mlsAPISupport = true; + geolocationSupport = true; } ).overrideAttrs (prev: {