diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-05-19 00:07:49 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-05-19 00:28:49 +0300 |
commit | 5445e521b6524587489c6968cc27347977b9b7b8 (patch) | |
tree | 5c311f2a3df02ff33e08f5e3a4133e21ad6d688d /pkgs | |
parent | f10859fe89de4559134e26b5fcdf32a1a936345d (diff) |
firefox: restore gstreamer support for older firefox releases
Diffstat (limited to 'pkgs')
3 files changed, 14 insertions, 7 deletions
diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 90d1d7a15026d..7de465292ed1e 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -172,6 +172,8 @@ stdenv.mkDerivation { --suffix XDG_DATA_DIRS : "$XDG_ICON_DIRS" ''; + passthru.ffmpegSupport = true; + meta = with stdenv.lib; { description = "Mozilla Firefox, free web browser (binary package)"; homepage = http://www.mozilla.org/firefox/; diff --git a/pkgs/applications/networking/browsers/firefox/default.nix b/pkgs/applications/networking/browsers/firefox/default.nix index 0ab5fbb7c5b6f..a122f067722c8 100644 --- a/pkgs/applications/networking/browsers/firefox/default.nix +++ b/pkgs/applications/networking/browsers/firefox/default.nix @@ -3,7 +3,7 @@ , freetype, fontconfig, file, alsaLib, nspr, nss, libnotify , yasm, mesa, sqlite, unzip, makeWrapper, pysqlite , hunspell, libevent, libstartup_notification, libvpx -, cairo, icu, libpng, jemalloc, libpulseaudio +, cairo, gstreamer, gst_plugins_base, icu, libpng, jemalloc, libpulseaudio , enableGTK3 ? false , debugBuild ? false , # If you want the resulting program to call itself "Firefox" instead @@ -39,7 +39,8 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec { icu libpng jemalloc libpulseaudio # only headers are needed ] - ++ lib.optional enableGTK3 gtk3; + ++ lib.optional enableGTK3 gtk3 + ++ lib.optionals (!passthru.ffmpegSupport) [ gstreamer gst_plugins_base ]; configureFlags = [ "--enable-application=browser" @@ -122,7 +123,8 @@ common = { pname, version, sha512 }: stdenv.mkDerivation rec { passthru = { inherit gtk nspr version; isFirefox3Like = true; - browserName = pname; + browserName = "firefox"; + ffmpegSupport = lib.versionAtLeast version "46.0"; }; }; diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 3372a3891e446..503c52ac7bab4 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -2,7 +2,7 @@ ## various stuff that can be plugged in , gnash, flashplayer, hal-flash -, MPlayerPlugin, gecko_mediaplayer, ffmpeg, xorg, libpulseaudio, libcanberra +, MPlayerPlugin, gecko_mediaplayer, ffmpeg, gst_all, xorg, libpulseaudio, libcanberra , supportsJDK, jrePlugin, icedtea_web , trezor-bridge, bluejeans, djview4, adobe-reader , google_talk_plugin, fribid, gnome3/*.gnome_shell*/ @@ -23,6 +23,7 @@ let cfg = stdenv.lib.attrByPath [ browserName ] {} config; enableAdobeFlash = cfg.enableAdobeFlash or false; enableGnash = cfg.enableGnash or false; + ffmpegSupport = browser.ffmpegSupport or false; jre = cfg.jre or false; icedtea = cfg.icedtea or false; @@ -45,11 +46,12 @@ let ++ lib.optional (cfg.enableAdobeReader or false) adobe-reader ++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin ); - libs = [ ffmpeg ] + libs = (if ffmpegSupport then [ ffmpeg ] else with gst_all; [ gstreamer gst-plugins-base ]) ++ lib.optionals (cfg.enableQuakeLive or false) (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 false) libpulseaudio; + gst-plugins = with gst_all; [ gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg ]; gtk_modules = [ libcanberra ]; in @@ -75,7 +77,7 @@ stdenv.mkDerivation { ]; }; - buildInputs = [makeWrapper]; + buildInputs = [makeWrapper] ++ lib.optionals (!ffmpegSupport) gst-plugins; buildCommand = '' if [ ! -x "${browser}/bin/${browserName}" ] @@ -91,7 +93,8 @@ stdenv.mkDerivation { --suffix-each GTK_PATH ':' "$gtk_modules" \ --suffix-each LD_PRELOAD ':' "$(cat $(filterExisting $(addSuffix /extra-ld-preload $plugins)))" \ --prefix-contents PATH ':' "$(filterExisting $(addSuffix /extra-bin-path $plugins))" \ - --set MOZ_OBJDIR "$(ls -d "${browser}/lib/${browserName}"*)" + --set MOZ_OBJDIR "$(ls -d "${browser}/lib/${browserName}"*)" \ + ${lib.optionalString (!ffmpegSupport) ''--prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"''} ${ lib.optionalString libtrick '' |