From 9ef3a513793e42d828b823c7ecb1488ddc2b9706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Tue, 23 Aug 2016 10:16:37 +0200 Subject: [PATCH] Adding vlc plugin for firefox. I really wanted it to substitute the html5 player, or at least the direct player for mp4/webm files in firefox, but I couldn't make it work. The formats recognized by the firefox internal player were used in all cases. The plugin worked for formats unknown by firefox. https://support.mozilla.org/ca/questions/1089501 Nevertheless, as I wrote the nix recipe, I commit it. It may be of interest to someone else. --- .../networking/browsers/firefox/wrapper.nix | 2 ++ pkgs/applications/video/vlc/plugin.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 3 files changed, 39 insertions(+) create mode 100644 pkgs/applications/video/vlc/plugin.nix diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 503c52ac7bab..c9adde4f15bb 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -7,6 +7,7 @@ , trezor-bridge, bluejeans, djview4, adobe-reader , google_talk_plugin, fribid, gnome3/*.gnome_shell*/ , esteidfirefoxplugin +, vlc_npapi }: ## configurability of the wrapper itself @@ -45,6 +46,7 @@ let ++ lib.optional (cfg.enableBluejeans or false) bluejeans ++ lib.optional (cfg.enableAdobeReader or false) adobe-reader ++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin + ++ lib.optional (cfg.enableVLC or false) vlc_npapi ); libs = (if ffmpegSupport then [ ffmpeg ] else with gst_all; [ gstreamer gst-plugins-base ]) ++ lib.optionals (cfg.enableQuakeLive or false) diff --git a/pkgs/applications/video/vlc/plugin.nix b/pkgs/applications/video/vlc/plugin.nix new file mode 100644 index 000000000000..3a3e9162999a --- /dev/null +++ b/pkgs/applications/video/vlc/plugin.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchgit, vlc, autoconf, automake, libtool, pkgconfig, npapi_sdk, +libxcb, xlibsWrapper, gtk}: + +with stdenv.lib; + +stdenv.mkDerivation rec { + name = "vlc-plugin-${version}"; + version = "2.2.2"; # This 2.2.2 builds fine with vlc 2.2.4 + + src = fetchgit { + url = "https://code.videolan.org/videolan/npapi-vlc.git"; + rev = "5fa6fbc11cf5bad983f57656c0085e47e18fbf20"; + sha256 = "18fbiy4r8rlw4fsgcxgzhi6qi9r48d0rmnp8hs994w2p94fa8kwd"; + }; + + preConfigure = "sh autogen.sh"; + + buildInputs = [ vlc autoconf automake libtool pkgconfig npapi_sdk libxcb + xlibsWrapper gtk ]; + + enableParallelBuilding = true; + + passthru = { + mozillaPlugin = "/lib/mozilla/plugins"; + }; + + meta = with stdenv.lib; { + description = "Webplugins based on libVLC (for firefox, npapi)"; + homepage = https://code.videolan.org/videolan/npapi-vlc; + platforms = platforms.linux; + license = licenses.gpl2Plus; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f34f4ae40cd4..4cb98fe2b208 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15143,6 +15143,10 @@ in libva = libva-full; # also wants libva-x11 }; + vlc_npapi = callPackage ../applications/video/vlc/plugin.nix { + gtk = gtk2; + }; + vlc_qt5 = qt5.vlc; vmpk = callPackage ../applications/audio/vmpk { };