mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
torbrowser: make additional media playback support optional
This feature might not be appropriate for all users, leave it off by
default.
See 96be6a11a8
This commit is contained in:
parent
fa18c37c71
commit
b18ff7ab82
@ -3,16 +3,19 @@
|
||||
, atk, pango, freetype, fontconfig, gdk_pixbuf, cairo, zlib
|
||||
, gstreamer, gst_plugins_base, gst_plugins_good, gst_ffmpeg, gmp, ffmpeg
|
||||
, libpulseaudio
|
||||
, mediaSupport ? false
|
||||
}:
|
||||
|
||||
let
|
||||
libPath = stdenv.lib.makeLibraryPath [
|
||||
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
|
||||
] ++ stdenv.lib.optionals mediaSupport [
|
||||
gstreamer gst_plugins_base gmp ffmpeg
|
||||
libpulseaudio
|
||||
] ;
|
||||
]);
|
||||
|
||||
# Ignored if !mediaSupport
|
||||
gstPlugins = [ gstreamer gst_plugins_base gst_plugins_good gst_ffmpeg ];
|
||||
|
||||
gstPluginsPath = stdenv.lib.concatMapStringsSep ":" (x:
|
||||
@ -77,7 +80,9 @@ 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}
|
||||
${stdenv.lib.optionalString mediaSupport ''
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user