diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 8256487b75181..73d2303bfc187 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)