firefox: remove flash support

This commit is contained in:
Bernardo Meurer 2021-02-07 14:02:11 -08:00
parent 5f39471ad4
commit 76dc1086dc
No known key found for this signature in database
GPG key ID: F4C0D53B8D14C246

View file

@ -2,7 +2,6 @@
, replace, fetchurl, zip, unzip, jq, xdg-utils, writeText , replace, fetchurl, zip, unzip, jq, xdg-utils, writeText
## various stuff that can be plugged in ## various stuff that can be plugged in
, flashplayer, hal-flash
, ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd, libnotify , ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd, libnotify
, gnome3/*.gnome-shell*/ , gnome3/*.gnome-shell*/
, browserpass, chrome-gnome-shell, uget-integrator, plasma5Packages, bukubrow, pipewire , browserpass, chrome-gnome-shell, uget-integrator, plasma5Packages, bukubrow, pipewire
@ -47,28 +46,31 @@ let
assert forceWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used assert forceWayland -> (browser ? gtk3); # Can only use the wayland backend if gtk3 is being used
let let
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;
alsaSupport = browser.alsaSupport or false; alsaSupport = browser.alsaSupport or false;
pipewireSupport = browser.pipewireSupport or false; pipewireSupport = browser.pipewireSupport or false;
# FIXME: This should probably be an assertion now?
plugins = plugins =
let let
removed = lib.filter (a: builtins.hasAttr a cfg) [ removed = lib.filter (a: builtins.hasAttr a cfg) [
"enableVLC" "enableAdobeFlash"
"enableDjvu"
"enableMPlayer"
"jre"
"icedtea"
"enableGoogleTalkPlugin"
"enableFriBIDPlugin"
"enableBluejeans"
"enableAdobeReader" "enableAdobeReader"
"enableBluejeans"
"enableDjvu"
"enableFriBIDPlugin"
"enableGoogleTalkPlugin"
"enableMPlayer"
"enableVLC"
"icedtea"
"jre"
]; ];
in if removed != [] in if removed != [] then
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)." throw "Your configuration mentions ${lib.concatMapStringsSep ", " (p: browserName + "." + p) removed}. All plugin related options 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; else
[]
;
nativeMessagingHosts = nativeMessagingHosts =
([ ] ([ ]
@ -88,7 +90,6 @@ let
++ lib.optional useGlvnd libglvnd ++ lib.optional useGlvnd libglvnd
++ lib.optionals (cfg.enableQuakeLive or false) ++ lib.optionals (cfg.enableQuakeLive or false)
(with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ]) (with xorg; [ stdenv.cc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ])
++ lib.optional (enableAdobeFlash && (cfg.enableAdobeFlashDRM or false)) hal-flash
++ lib.optional (config.pulseaudio or true) libpulseaudio ++ lib.optional (config.pulseaudio or true) libpulseaudio
++ lib.optional alsaSupport alsaLib ++ lib.optional alsaSupport alsaLib
++ pkcs11Modules; ++ pkcs11Modules;