From 96be6a11a85e9e253cf733e57ce7c67fd1a3b81c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 14 Dec 2016 02:54:13 +0100 Subject: [PATCH] torbrowser: support H.264 playback Fixes https://github.com/NixOS/nixpkgs/issues/20840 Some notes for future reference: - Firefox only supports legacy gstreamer (0.10) - gmp and ffmpeg are appearantly used by gst-ffmpeg so must be in the library search path - Setting GST_DEBUG="*:3" or so was useful in figuring out what to add --- pkgs/tools/security/tor/torbrowser.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/tools/security/tor/torbrowser.nix b/pkgs/tools/security/tor/torbrowser.nix index d0484b251a49..0368d9d7a0bd 100644 --- a/pkgs/tools/security/tor/torbrowser.nix +++ b/pkgs/tools/security/tor/torbrowser.nix @@ -1,13 +1,20 @@ { stdenv, fetchurl, makeDesktopItem , libXrender, libX11, libXext, libXt, alsaLib, dbus, dbus_glib, glib, gtk2 , atk, pango, freetype, fontconfig, gdk_pixbuf, cairo, zlib +, gstreamer, gst_plugins_base, gst_plugins_good, gst_ffmpeg, gmp, ffmpeg }: let libPath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc zlib glib alsaLib dbus dbus_glib gtk2 atk pango freetype fontconfig gdk_pixbuf cairo libXrender libX11 libXext libXt + gstreamer gst_plugins_base gmp ffmpeg ]; + + gstPlugins = [ gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg ]; + + gstPluginsPath = stdenv.lib.concatMapStringsSep ":" (x: + "${x}/lib/gstreamer-0.10") gstPlugins; in stdenv.mkDerivation rec { @@ -66,6 +73,7 @@ stdenv.mkDerivation rec { fi export FONTCONFIG_PATH=\$HOME/Data/fontconfig export LD_LIBRARY_PATH=${libPath}:$out/share/tor-browser/Browser/TorBrowser/Tor + export GST_PLUGIN_SYSTEM_PATH=${gstPluginsPath} exec $out/share/tor-browser/Browser/firefox --class "Tor Browser" -no-remote -profile ~/Data/Browser/profile.default "\$@" EOF chmod +x $out/bin/tor-browser