diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-10-05 22:35:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 22:35:16 -0500 |
commit | 8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880 (patch) | |
tree | 37d5bc5a0c045de330f5ca90206e875d8fb2ffe8 /pkgs/applications/networking | |
parent | 0421891aaa0fb7b4895224bf8d81c1a7dafecd59 (diff) | |
parent | ba2fe3c9a626a8fb845c786383b8b23ad8355951 (diff) | |
download | nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar.gz nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar.bz2 nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar.lz nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar.xz nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.tar.zst nixpkgs-8dccd8cd62c88ebdc69aa3e688c23f1f2afb2880.zip |
Merge pull request #47357 from coreyoconnor/firefox-no-update
firefox: disable auto updates using distribution policies.
Diffstat (limited to 'pkgs/applications/networking')
-rw-r--r-- | pkgs/applications/networking/browsers/firefox-bin/default.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 91aee7b1e8a..c81c7934985 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -42,6 +42,7 @@ , channel , generated , writeScript +, writeText , xidel , coreutils , gnused @@ -69,6 +70,12 @@ let 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; source = stdenv.lib.findFirst (sourceMatches systemLocale) defaultSource sources; @@ -172,6 +179,10 @@ stdenv.mkDerivation { ln -s "$out/usr/lib" "$out/lib" 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"; |