mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 13:00:23 +00:00
buildMozillaMach: set geo.provider.network.url for new profiles.
Use Mozilla Location Service as geolocation provider for new profiles,
since our Google API key does not seem to work for geolocation at this
time.
Related: https://github.com/NixOS/nixpkgs/issues/173758
(cherry picked from commit 2d97db7873)
This commit is contained in:
committed by
github-actions[bot]
parent
a42e4414ac
commit
32bd8a47d8
@@ -186,6 +186,18 @@ let
|
||||
};
|
||||
});
|
||||
|
||||
defaultPrefs = {
|
||||
"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";
|
||||
};
|
||||
};
|
||||
|
||||
defaultPrefsFile = pkgs.writeText "nixos-default-prefs.js" (lib.concatStringsSep "\n" (lib.mapAttrsToList (key: value: ''
|
||||
// ${value.reason}
|
||||
pref("${key}", ${builtins.toJSON value.value});
|
||||
'') defaultPrefs));
|
||||
|
||||
in
|
||||
|
||||
buildStdenv.mkDerivation ({
|
||||
@@ -474,6 +486,7 @@ buildStdenv.mkDerivation ({
|
||||
postInstall = ''
|
||||
# Install distribution customizations
|
||||
install -Dvm644 ${distributionIni} $out/lib/${binaryName}/distribution/distribution.ini
|
||||
install -Dvm644 ${defaultPrefsFile} $out/lib/${binaryName}/browser/defaults/preferences/nixos-default-prefs.js
|
||||
|
||||
'' + lib.optionalString buildStdenv.isLinux ''
|
||||
# Remove SDK cruft. FIXME: move to a separate output?
|
||||
|
||||
Reference in New Issue
Block a user