firefox-wrapper: remove dead npapi plugin code

This commit is contained in:
Dominik Xaver Hörl 2020-04-15 17:32:01 +02:00
parent c6ca626b4b
commit c51b0afd54

View File

@ -2,10 +2,8 @@
## various stuff that can be plugged in ## various stuff that can be plugged in
, flashplayer, hal-flash , flashplayer, hal-flash
, MPlayerPlugin, ffmpeg, xorg, libpulseaudio, libcanberra-gtk2, libglvnd , ffmpeg, xorg, libpulseaudio, libcanberra-gtk2, libglvnd
, jrePlugin, adoptopenjdk-icedtea-web , gnome3/*.gnome-shell*/
, bluejeans, djview4, adobe-reader
, google_talk_plugin, fribid, gnome3/*.gnome-shell*/
, browserpass, chrome-gnome-shell, uget-integrator, plasma-browser-integration, bukubrow , browserpass, chrome-gnome-shell, uget-integrator, plasma-browser-integration, bukubrow
, tridactyl-native , tridactyl-native
, fx_cast_bridge , fx_cast_bridge
@ -26,7 +24,6 @@ let
(lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName) (lib.toUpper (lib.substring 0 1 browserName) + lib.substring 1 (-1) browserName)
, nameSuffix ? "" , nameSuffix ? ""
, icon ? browserName , icon ? browserName
, extraPlugins ? []
, extraNativeMessagingHosts ? [] , extraNativeMessagingHosts ? []
, gdkWayland ? false , gdkWayland ? false
, cfg ? config.${browserName} or {} , cfg ? config.${browserName} or {}
@ -38,32 +35,25 @@ let
enableAdobeFlash = cfg.enableAdobeFlash or false; enableAdobeFlash = cfg.enableAdobeFlash or false;
ffmpegSupport = browser.ffmpegSupport or false; ffmpegSupport = browser.ffmpegSupport or false;
gssSupport = browser.gssSupport 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 = plugins =
assert !(jre && icedtea); let
if builtins.hasAttr "enableVLC" cfg removed = lib.filter (a: builtins.hasAttr a cfg) [
then throw "The option \"${browserName}.enableVLC\" has been removed since Firefox no longer supports npapi plugins" "enableVLC"
else "enableDjvu"
([ ] "enableMPlayer"
++ lib.optional enableAdobeFlash flashplayer "jre"
++ lib.optional (cfg.enableDjvu or false) (djview4) "icedtea"
++ lib.optional (cfg.enableMPlayer or false) (MPlayerPlugin browser) "enableGoogleTalkPlugin"
++ lib.optional (supportsJDK && jre && jrePlugin ? mozillaPlugin) jrePlugin "enableFriBIDPlugin"
++ lib.optional icedtea adoptopenjdk-icedtea-web "enableGnomeExtensions"
++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin "enableBluejeans"
++ lib.optional (cfg.enableFriBIDPlugin or false) fribid "enableAdobeReader"
++ lib.optional (cfg.enableGnomeExtensions or false) gnome3.gnome-shell ];
++ lib.optional (cfg.enableBluejeans or false) bluejeans in if removed != []
++ lib.optional (cfg.enableAdobeReader or false) adobe-reader 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)."
++ extraPlugins else lib.optional enableAdobeFlash flashplayer;
);
nativeMessagingHosts = nativeMessagingHosts =
([ ] ([ ]
++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass) ++ lib.optional (cfg.enableBrowserpass or false) (lib.getBin browserpass)