Merge pull request #47357 from coreyoconnor/firefox-no-update
firefox: disable auto updates using distribution policies.
This commit is contained in:
commit
8dccd8cd62
@ -42,6 +42,7 @@
|
|||||||
, channel
|
, channel
|
||||||
, generated
|
, generated
|
||||||
, writeScript
|
, writeScript
|
||||||
|
, writeText
|
||||||
, xidel
|
, xidel
|
||||||
, coreutils
|
, coreutils
|
||||||
, gnused
|
, gnused
|
||||||
@ -69,6 +70,12 @@ let
|
|||||||
|
|
||||||
systemLocale = config.i18n.defaultLocale or "en-US";
|
systemLocale = config.i18n.defaultLocale or "en-US";
|
||||||
|
|
||||||
|
policies = {
|
||||||
|
DisableAppUpdate = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
policiesJson = writeText "no-update-firefox-policy.json" (builtins.toJSON { inherit policies; });
|
||||||
|
|
||||||
defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
|
defaultSource = stdenv.lib.findFirst (sourceMatches "en-US") {} sources;
|
||||||
|
|
||||||
source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
|
source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources;
|
||||||
@ -172,6 +179,10 @@ stdenv.mkDerivation {
|
|||||||
ln -s "$out/usr/lib" "$out/lib"
|
ln -s "$out/usr/lib" "$out/lib"
|
||||||
|
|
||||||
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
gappsWrapperArgs+=(--argv0 "$out/bin/.firefox-wrapped")
|
||||||
|
|
||||||
|
# See: https://github.com/mozilla/policy-templates/blob/master/README.md
|
||||||
|
mkdir -p "$out/lib/firefox-bin-${version}/distribution";
|
||||||
|
ln -s ${policiesJson} "$out/lib/firefox-bin-${version}/distribution/policies.json";
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.execdir = "/bin";
|
passthru.execdir = "/bin";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user