Skip to content

Commit

Permalink
torbrowser: support H.264 playback
Browse files Browse the repository at this point in the history
Fixes #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
  • Loading branch information
joachifm committed Dec 14, 2016
1 parent 7d134fc commit 96be6a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkgs/tools/security/tor/torbrowser.nix
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 96be6a1

Please sign in to comment.