about summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers
diff options
context:
space:
mode:
authorDominik Xaver Hörl <hoe.dom@gmx.de>2020-04-15 17:32:01 +0200
committerDominik Xaver Hörl <hoe.dom@gmx.de>2020-04-16 10:12:09 +0200
commitc51b0afd54339049db05d7854a188c1754bd9de5 (patch)
treed4cae2803d7307dabf9e53c18b15193d792524b8 /pkgs/applications/networking/browsers
parentc6ca626b4bd6926550918ff0e0ab68cf8781ae1e (diff)
downloadnixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar.gz
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar.bz2
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar.lz
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar.xz
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.tar.zst
nixlib-c51b0afd54339049db05d7854a188c1754bd9de5.zip
firefox-wrapper: remove dead npapi plugin code
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r--pkgs/applications/networking/browsers/firefox/wrapper.nix48
1 files changed, 19 insertions, 29 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix
index 8256487b7518..73d2303bfc18 100644
--- a/pkgs/applications/networking/browsers/firefox/wrapper.nix
+++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix
@@ -2,10 +2,8 @@
 
 ## various stuff that can be plugged in
 , flashplayer, hal-flash
-, MPlayerPlugin, ffmpeg, xorg, libpulseaudio, libcanberra-gtk2, libglvnd
-, jrePlugin, adoptopenjdk-icedtea-web
-, bluejeans, djview4, adobe-reader
-, google_talk_plugin, fribid, gnome3/*.gnome-shell*/
+, ffmpeg, xorg, libpulseaudio, libcanberra-gtk2, libglvnd
+, gnome3/*.gnome-shell*/
 , browserpass, chrome-gnome-shell, uget-integrator, plasma-browser-integration, bukubrow
 , tridactyl-native
 , fx_cast_bridge
@@ -26,7 +24,6 @@ let
       (lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName)
     , nameSuffix ? ""
     , icon ? browserName
-    , extraPlugins ? []
     , extraNativeMessagingHosts ? []
     , gdkWayland ? false
     , cfg ? config.${browserName} or {}
@@ -38,32 +35,25 @@ let
       enableAdobeFlash = cfg.enableAdobeFlash or false;
       ffmpegSupport = browser.ffmpegSupport or false;
       gssSupport = browser.gssSupport or false;
-      jre = cfg.jre or false;
-      icedtea = cfg.icedtea or false;
-      supportsJDK =
-        stdenv.hostPlatform.system == "i686-linux" ||
-        stdenv.hostPlatform.system == "x86_64-linux" ||
-        stdenv.hostPlatform.system == "armv7l-linux" ||
-        stdenv.hostPlatform.system == "aarch64-linux";
 
       plugins =
-        assert !(jre && icedtea);
-        if builtins.hasAttr "enableVLC" cfg
-        then throw "The option \"${browserName}.enableVLC\" has been removed since Firefox no longer supports npapi plugins"
-        else
-        ([ ]
-          ++ lib.optional enableAdobeFlash flashplayer
-          ++ lib.optional (cfg.enableDjvu or false) (djview4)
-          ++ lib.optional (cfg.enableMPlayer or false) (MPlayerPlugin browser)
-          ++ lib.optional (supportsJDK && jre && jrePlugin ? mozillaPlugin) jrePlugin
-          ++ lib.optional icedtea adoptopenjdk-icedtea-web
-          ++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin
-          ++ lib.optional (cfg.enableFriBIDPlugin or false) fribid
-          ++ lib.optional (cfg.enableGnomeExtensions or false) gnome3.gnome-shell
-          ++ lib.optional (cfg.enableBluejeans or false) bluejeans
-          ++ lib.optional (cfg.enableAdobeReader or false) adobe-reader
-          ++ extraPlugins
-        );
+        let
+          removed = lib.filter (a: builtins.hasAttr a cfg) [
+            "enableVLC"
+            "enableDjvu"
+            "enableMPlayer"
+            "jre"
+            "icedtea"
+            "enableGoogleTalkPlugin"
+            "enableFriBIDPlugin"
+            "enableGnomeExtensions"
+            "enableBluejeans"
+            "enableAdobeReader"
+          ];
+        in if removed != []
+           then throw "Your configuration mentions ${lib.concatMapStringsSep ", " (p: browserName + "." + p) removed}. All plugin related options, except for the adobe flash player, have been removed, since Firefox from version 52 onwards no longer supports npapi plugins (see https://support.mozilla.org/en-US/kb/npapi-plugins)."
+           else lib.optional enableAdobeFlash flashplayer;
+
       nativeMessagingHosts =
         ([ ]
           ++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)