summary refs log tree commit diff
path: root/pkgs/applications/video
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-04-01 10:06:01 +0200
committerVladimír Čunát <vcunat@gmail.com>2016-04-01 10:06:01 +0200
commitab15a62c68bf7bf3b02e3bab00d121cc1426733c (patch)
tree398a82403b04bfa0bae8cadf1c5a64cf83145965 /pkgs/applications/video
parentc643ccaa8c91f78b8c89eb87589886b8906d5b38 (diff)
parenta26357eefe017964448b5bb464163646b927a267 (diff)
downloadnixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.gz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.bz2
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.lz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.xz
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.tar.zst
nixlib-ab15a62c68bf7bf3b02e3bab00d121cc1426733c.zip
Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r--pkgs/applications/video/avidemux/default.nix127
-rw-r--r--pkgs/applications/video/avidemux/dynamic_install_dir.patch12
-rw-r--r--pkgs/applications/video/avidemux/wrapper.nix29
-rw-r--r--pkgs/applications/video/dvdbackup/default.nix20
-rw-r--r--pkgs/applications/video/kodi/plugins.nix126
-rw-r--r--pkgs/applications/video/makemkv/default.nix6
-rw-r--r--pkgs/applications/video/mjpg-streamer/default.nix37
-rw-r--r--pkgs/applications/video/mkvtoolnix/default.nix94
-rw-r--r--pkgs/applications/video/pitivi/default.nix1
-rw-r--r--pkgs/applications/video/popcorntime/default.nix78
-rw-r--r--pkgs/applications/video/subtitleeditor/default.nix63
-rw-r--r--pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patch55
-rw-r--r--pkgs/applications/video/vlc/default.nix5
13 files changed, 437 insertions, 216 deletions
diff --git a/pkgs/applications/video/avidemux/default.nix b/pkgs/applications/video/avidemux/default.nix
index 3b48a447f6ff..177f3d1b20c9 100644
--- a/pkgs/applications/video/avidemux/default.nix
+++ b/pkgs/applications/video/avidemux/default.nix
@@ -1,46 +1,115 @@
-{stdenv, fetchurl, cmake, pkgconfig, libxml2, qt4, gtk, gettext, SDL,
-libXv, pixman, libpthreadstubs, libXau, libXdmcp, libxslt, x264,
-alsaLib, lame, faad2, libvorbis, yasm, libvpx, xvidcore, libva,
-faac ? null, faacSupport ? false }:
+{ stdenv, lib, fetchurl, cmake, pkgconfig, lndir
+, zlib, gettext, libvdpau, libva, libXv, sqlite, x265
+, yasm, fribidi, gtk3, qt4
+, withX264 ? true, x264
+, withLAME ? true, lame
+, withFAAC ? false, faac
+, withVorbis ? true, libvorbis
+, withPulse ? true, libpulseaudio
+, withFAAD ? true, faad2
+, withOpus ? true, libopus
+, withVPX ? true, libvpx
+}:
 
-assert stdenv ? glibc;
-assert faacSupport -> faac != null;
-
-stdenv.mkDerivation {
-  name = "avidemux-2.5.6";
+stdenv.mkDerivation rec {
+  name = "avidemux-${version}";
+  version = "2.6.12";
 
   src = fetchurl {
-    url = mirror://sourceforge/avidemux/avidemux_2.5.6.tar.gz;
-    sha256 = "12wvxz0n2g85f079d8mdkkp2zm279d34m9v7qgcqndh48cn7znnn";
+    url = "mirror://sourceforge/avidemux/avidemux/${version}/avidemux_${version}.tar.gz";
+    sha256 = "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn";
   };
 
-  buildInputs = [ cmake pkgconfig libxml2 qt4 gtk gettext SDL libXv
-    pixman libpthreadstubs libXau libXdmcp libxslt x264 alsaLib
-    lame faad2 libvorbis yasm libvpx xvidcore libva
-  ] ++ stdenv.lib.optional faacSupport faac;
+  nativeBuildInputs = [ cmake pkgconfig yasm lndir ];
+  buildInputs = [ zlib gettext libvdpau libva libXv sqlite x265 fribidi gtk3 qt4 ]
+             ++ lib.optional withX264 x264
+             ++ lib.optional withLAME lame
+             ++ lib.optional withFAAC faac
+             ++ lib.optional withVorbis libvorbis
+             ++ lib.optional withPulse libpulseaudio
+             ++ lib.optional withFAAD faad2
+             ++ lib.optional withOpus libopus
+             ++ lib.optional withVPX libvpx
+             ;
+
+  enableParallelBuilding = false;
+
+  outputs = [ "out" "cli" "gtk" "qt4" ];
+
+  patches = [ ./dynamic_install_dir.patch ];
+
+  buildCommand = ''
+    unpackPhase
+    cd "$sourceRoot"
+    patchPhase
+
+    export cmakeFlags="$cmakeFlags -DAVIDEMUX_SOURCE_DIR=$(pwd)"
+
+    function buildOutput() {
+      ( plugin_ui="$1"
+        output_dir="$2"
+        shift 2
+        export cmakeFlags="$cmakeFlags -DPLUGIN_UI=$plugin_ui -DCMAKE_INSTALL_PREFIX=$output_dir"
+        for i in "$@" avidemux_plugins; do
+          ( cd "$i"
+            cmakeConfigurePhase
+            buildPhase
+            installPhase
+          )
+        done
+        rm -rf avidemux_plugins/build
+      )
+    }
+
+    function buildUi() {
+      plugin_ui="$1"
+      output_dir="$2"
+      shift 2
+
+      # Hack to split builds properly
+      mkdir -p $output_dir
+      lndir $out $output_dir
+      buildOutput $plugin_ui $output_dir "$@"
+    }
+
+    function fixupUi() {
+      output_dir="$1"
+      shift
 
-  cmakeFlags = "-DPTHREAD_INCLUDE_DIR=${stdenv.glibc.dev}/include" +
-    " -DGETTEXT_INCLUDE_DIR=${gettext}/include" +
-    " -DSDL_INCLUDE_DIR=${SDL.dev}/include/SDL";
+      find $output_dir -lname $out\* -delete
+      find $output_dir -type f | while read -r f; do
+        rpath="$(patchelf --print-rpath $f 2>/dev/null)" || continue
+        new_rpath=""
+        IFS=':' read -ra old_rpath <<< "$rpath"
+        for p in "''${old_rpath[@]}"; do
+          new_rpath="$new_rpath:$p"
+          if [[ $p = $output_dir* ]]; then
+            new_rpath="$new_rpath:$out/''${p#$output_dir}"
+          fi
+        done
+        patchelf --set-rpath "$new_rpath" $f
+        patchelf --shrink-rpath $f
+      done
+    }
 
-  NIX_LDFLAGS="-lpthread";
+    buildOutput COMMON $out avidemux_core
+    buildOutput SETTINGS $out
+    buildUi CLI $cli avidemux/cli
+    buildUi GTK $gtk avidemux/gtk
+    buildUi QT4 $qt4 avidemux/qt4
 
-  postInstall = ''
-    cd $NIX_BUILD_TOP/$sourceRoot
-    mkdir build_plugins
-    cd build_plugins
-    cmake $cmakeFlags -DAVIDEMUX_INSTALL_PREFIX=$out \
-      -DAVIDEMUX_SOURCE_DIR=$NIX_BUILD_TOP/$sourceRoot \
-      -DAVIDEMUX_CORECONFIG_DIR=$NIX_BUILD_TOP/$sourceRoot/build/config ../plugins
+    fixupPhase
 
-    make
-    make install
+    fixupUi $cli
+    fixupUi $gtk
+    fixupUi $qt4
   '';
 
   meta = {
     homepage = http://fixounet.free.fr/avidemux/;
     description = "Free video editor designed for simple video editing tasks";
-    maintainers = with stdenv.lib.maintainers; [viric];
+    maintainers = with stdenv.lib.maintainers; [ viric abbradar ];
     platforms = with stdenv.lib.platforms; linux;
+    license = stdenv.lib.licenses.gpl2;
   };
 }
diff --git a/pkgs/applications/video/avidemux/dynamic_install_dir.patch b/pkgs/applications/video/avidemux/dynamic_install_dir.patch
new file mode 100644
index 000000000000..f2f963e51694
--- /dev/null
+++ b/pkgs/applications/video/avidemux/dynamic_install_dir.patch
@@ -0,0 +1,12 @@
+diff -ru3 avidemux_2.6.12.old/avidemux_core/ADM_core/src/ADM_fileio.cpp avidemux_2.6.12/avidemux_core/ADM_core/src/ADM_fileio.cpp
+--- avidemux_2.6.12.old/avidemux_core/ADM_core/src/ADM_fileio.cpp	2016-03-25 15:26:00.368213627 +0300
++++ avidemux_2.6.12/avidemux_core/ADM_core/src/ADM_fileio.cpp	2016-03-26 02:32:56.163550537 +0300
+@@ -393,7 +393,7 @@
+ 

+ 	return ADM_getRelativePath(buffer, base1, base2, base3);

+ #else

+-	return ADM_getRelativePath(ADM_INSTALL_DIR, base1, base2, base3);

++	return ADM_getRelativePath(getenv("ADM_ROOT_DIR"), base1, base2, base3);

+ #endif

+ }

+ 

diff --git a/pkgs/applications/video/avidemux/wrapper.nix b/pkgs/applications/video/avidemux/wrapper.nix
new file mode 100644
index 000000000000..ad41f56d39d2
--- /dev/null
+++ b/pkgs/applications/video/avidemux/wrapper.nix
@@ -0,0 +1,29 @@
+{ buildEnv, avidemux, makeWrapper
+# GTK version is broken upstream, see https://bugzilla.redhat.com/show_bug.cgi?id=1244340
+, withUi ? "qt4"
+}:
+
+let
+  ui = builtins.getAttr withUi avidemux;
+
+in buildEnv {
+  name = "avidemux-${withUi}-" + avidemux.version;
+
+  paths = [ avidemux ui ];
+
+  buildInputs = [ makeWrapper ];
+
+  postBuild = ''
+    # TODO: This could be avoided if buildEnv could be forced to create all directories
+    if [ -L $out/bin ]; then
+      rm $out/bin
+      mkdir $out/bin
+      for i in ${ui}/bin/*; do
+        ln -s $i $out/bin
+      done
+    fi
+    for i in $out/bin/*; do
+      wrapProgram $i --set ADM_ROOT_DIR $out
+    done
+  '';
+}
diff --git a/pkgs/applications/video/dvdbackup/default.nix b/pkgs/applications/video/dvdbackup/default.nix
new file mode 100644
index 000000000000..cb2a69b53ca9
--- /dev/null
+++ b/pkgs/applications/video/dvdbackup/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, libdvdread, libdvdcss, dvdauthor }:
+
+stdenv.mkDerivation rec {
+  version = "0.4.2";
+  name = "dvdbackup-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/dvdbackup/${name}.tar.xz";
+    sha256 = "1rl3h7waqja8blmbpmwy01q9fgr5r0c32b8dy3pbf59bp3xmd37g";
+  };
+
+  buildInputs = [ libdvdread libdvdcss dvdauthor ];
+
+  meta = {
+    description = "A tool to rip video DVDs from the command line";
+    homepage = http://dvdbackup.sourceforge.net/;
+    license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = [ stdenv.lib.maintainers.bradediger ];
+  };
+}
diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index 96c47a15ef1c..0ad638dd7054 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -89,41 +89,46 @@ in
     };
   }).override { buildInputs = [ unzip ]; };
 
-  urlresolver = (mkKodiPlugin rec {
-
-    plugin = "urlresolver";
-    namespace = "script.module.urlresolver";
-    version = "2.10.0";
-
-    src = fetchFromGitHub {
-      name = plugin + "-" + version + ".tar.gz";
-      owner = "Eldorados";
-      repo = namespace;
-      rev = "72b9d978d90d54bb7a0224a1fd2407143e592984";
-      sha256 = "0r5glfvgy9ri3ar9zdkvix8lalr1kfp22fap2pqp739b6k2iqir6";
+  hyper-launcher = let
+    pname = "hyper-launcher";
+    version = "1.2.0";
+    src = fetchFromGitHub rec {
+      name = pname + "-" + version + ".tar.gz";
+      owner = "teeedubb";
+      repo = owner + "-xbmc-repo";
+      rev = "9bd170407436e736d2d709f8af9968238594669c";
+      sha256 = "019nqf7kixicnrzkg671x4yq723igjkhfl8hz5bifi9gx2qcy8hy";
     };
-
     meta = with stdenv.lib; {
-      homepage = "https://github.com/Eldorados/urlresolver";
-      description = "Resolve common video host URL's to be playable in XBMC/Kodi";
+      homepage = http://forum.kodi.tv/showthread.php?tid=258159;
+      description = "A ROM launcher for Kodi that uses HyperSpin assets.";
       maintainers = with maintainers; [ edwtjo ];
     };
-  }).override {
-    postPatch = "sed -i -e 's,settings_file = os.path.join(addon_path,settings_file = os.path.join(profile_path,g' lib/urlresolver/common.py";
+  in {
+    service = mkKodiPlugin {
+      plugin = pname + "-service";
+      namespace = "service.hyper.launcher";
+      inherit version src meta;
+    };
+    plugin = mkKodiPlugin {
+      plugin = pname;
+      namespace = "plugin.hyper.launcher";
+      inherit version src meta;
+    };
   };
 
   salts = mkKodiPlugin rec {
 
     plugin = "salts";
     namespace = "plugin.video.salts";
-    version = "2.0.6";
+    version = "2.0.19";
 
     src = fetchFromGitHub {
       name = plugin + "-" + version + ".tar.gz";
       owner = "tknorris";
       repo = plugin;
-      rev = "5100565bec5818cdcd8a891ab6a6d67b0018e070";
-      sha256 = "00nlcddmgzyi3462i12qikdryfwqzqd1i30rkp485ay16akyj0lr";
+      rev = "9c1882bad35cab9e62687847e097c37a576b900d";
+      sha256 = "0saq578xsxvyg1v8jg2m3131hfrr95gv74b2npxr7g715yyx5bjq";
     };
 
     meta = with stdenv.lib; {
@@ -137,14 +142,14 @@ in
 
     plugin = "svtplay";
     namespace = "plugin.video.svtplay";
-    version = "4.0.21";
+    version = "4.0.23";
 
     src = fetchFromGitHub {
       name = plugin + "-" + version + ".tar.gz";
       owner = "nilzen";
       repo = "xbmc-" + plugin;
-      rev = "1fb099dcddc65e58ca8691d19de657321b1b1fc2";
-      sha256 = "178krh8kzll7cprqwyhydb41b1jh961av875bm5yfdlplzaiynm0";
+      rev = "80b6d241adb046c105ceb63d637da3f7f3684f1a";
+      sha256 = "1236kanzl4dra78whpwic1r5iifaj3f27qycia9jr54z01id083s";
     };
 
     meta = with stdenv.lib; {
@@ -166,13 +171,13 @@ in
 
     plugin = "steam-launcher";
     namespace = "script.steam.launcher";
-    version = "3.1.1";
+    version = "3.1.4";
 
     src = fetchFromGitHub rec {
       owner = "teeedubb";
       repo = owner + "-xbmc-repo";
-      rev = "bb66db7c4927619485373699ff865a9b00e253bb";
-      sha256 = "1skjkz0h6nkg04vylhl4zzavf5lba75j0qbgdhb9g7h0a98jz7s4";
+      rev = "db67704c3e16bdcdd3bdfe2926c609f1f6bdc4fb";
+      sha256 = "001a7zs3a4jfzj8ylxv2klc33mipmqsd5aqax7q81fbgwdlndvbm";
     };
 
     meta = with stdenv.lib; {
@@ -191,23 +196,22 @@ in
     propagatedBuildinputs = [ steam ];
   };
 
-  t0mm0-common = mkKodiPlugin rec {
-
-    plugin = "t0mm0-common";
-    namespace = "script.module.t0mm0.common";
-    version = "0.0.1";
+  pdfreader = mkKodiPlugin rec {
+    plugin = "pdfreader";
+    namespace = "plugin.image.pdf";
+    version = "1.0.2";
 
-    src = fetchFromGitHub {
+    src = fetchFromGitHub rec {
       name = plugin + "-" + version + ".tar.gz";
-      owner = "t0mm0";
-      repo = "xbmc-urlresolver";
-      rev = "ab16933a996a9e77b572953c45e70900c723d6e1";
-      sha256 = "1yd00md8iirizzaiqy6fv1n2snydcpqvp2f9irzfzxxi3i9asb93";
+      owner = "teeedubb";
+      repo = owner + "-xbmc-repo";
+      rev = "0a405b95208ced8a1365ad3193eade8d1c2117ce";
+      sha256 = "1iv7d030z3xvlflvp4p5v3riqnwg9g0yvzxszy63v1a6x5kpjkqa";
     };
 
     meta = with stdenv.lib; {
-      homepage = "https://github.com/t0mm0/xbmc-urlresolver/";
-      description = "t0mm0's common stuff";
+      homepage = http://forum.kodi.tv/showthread.php?tid=187421;
+      descritpion = "A comic book reader";
       maintainers = with maintainers; [ edwtjo ];
     };
   };
@@ -241,7 +245,51 @@ in
     # them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
     installPhase = ''
       make install
-      ln -s $out/lib/kodi/addons/pvr.hts/pvr.hts.so $out/share/kodi/addons/pvr.hts
+      ln -s $out/lib/kodi/addons/pvr.hts/pvr.hts.so* $out/share/kodi/addons/pvr.hts
     '';
   };
+
+  t0mm0-common = mkKodiPlugin rec {
+
+    plugin = "t0mm0-common";
+    namespace = "script.module.t0mm0.common";
+    version = "0.0.1";
+
+    src = fetchFromGitHub {
+      name = plugin + "-" + version + ".tar.gz";
+      owner = "t0mm0";
+      repo = "xbmc-urlresolver";
+      rev = "ab16933a996a9e77b572953c45e70900c723d6e1";
+      sha256 = "1yd00md8iirizzaiqy6fv1n2snydcpqvp2f9irzfzxxi3i9asb93";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = "https://github.com/t0mm0/xbmc-urlresolver/";
+      description = "t0mm0's common stuff";
+      maintainers = with maintainers; [ edwtjo ];
+    };
+  };
+
+  urlresolver = (mkKodiPlugin rec {
+
+    plugin = "urlresolver";
+    namespace = "script.module.urlresolver";
+    version = "2.10.0";
+
+    src = fetchFromGitHub {
+      name = plugin + "-" + version + ".tar.gz";
+      owner = "Eldorados";
+      repo = namespace;
+      rev = "72b9d978d90d54bb7a0224a1fd2407143e592984";
+      sha256 = "0r5glfvgy9ri3ar9zdkvix8lalr1kfp22fap2pqp739b6k2iqir6";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = "https://github.com/Eldorados/urlresolver";
+      description = "Resolve common video host URL's to be playable in XBMC/Kodi";
+      maintainers = with maintainers; [ edwtjo ];
+    };
+  }).override {
+    postPatch = "sed -i -e 's,settings_file = os.path.join(addon_path,settings_file = os.path.join(profile_path,g' lib/urlresolver/common.py";
+  };
 }
diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix
index b65dfe921c49..30fd9a57c4b6 100644
--- a/pkgs/applications/video/makemkv/default.nix
+++ b/pkgs/applications/video/makemkv/default.nix
@@ -4,17 +4,17 @@
 
 stdenv.mkDerivation rec {
   name = "makemkv-${ver}";
-  ver = "1.9.7";
+  ver = "1.9.9";
   builder = ./builder.sh;
 
   src_bin = fetchurl {
     url = "http://www.makemkv.com/download/makemkv-bin-${ver}.tar.gz";
-    sha256 = "1b1kdfs89ms2vyi4406ydw01py0mvvij01rx9anblgy10bc0yvfy";
+    sha256 = "1rsmsfyxjh18bdj93gy7whm4j6k1098zfak8napxsqfli7dyijb6";
   };
 
   src_oss = fetchurl {
     url = "http://www.makemkv.com/download/makemkv-oss-${ver}.tar.gz";
-    sha256 = "169fl1v3i133ihldyfq3akj3x30qsxndw7q52vv90gmn5r52bzb9";
+    sha256 = "070x8l88nv70abd9gy8jchs09mh09x6psjc0zs4vplk61cbqk3b0";
   };
 
   buildInputs = [openssl qt4 mesa zlib pkgconfig libav];
diff --git a/pkgs/applications/video/mjpg-streamer/default.nix b/pkgs/applications/video/mjpg-streamer/default.nix
index 7cacc4fcf05e..5409cf9f2f7f 100644
--- a/pkgs/applications/video/mjpg-streamer/default.nix
+++ b/pkgs/applications/video/mjpg-streamer/default.nix
@@ -1,34 +1,31 @@
-{stdenv, fetchsvn, pkgconfig, libjpeg, imagemagick, libv4l}:
+{ stdenv, fetchFromGitHub, cmake, libjpeg }:
 
 stdenv.mkDerivation rec {
-  rev = "182";
-  name = "mjpg-streamer-${rev}";
+  name = "mjpg-streamer-${version}";
+  version = "2016-03-08";
 
-  src = fetchsvn {
-    url = https://mjpg-streamer.svn.sourceforge.net/svnroot/mjpg-streamer/mjpg-streamer;
-    inherit rev;
-    sha256 = "008k2wk6xagprbiwk8fvzbz4dd6i8kzrr9n62gj5i1zdv7zcb16q";
+  src = fetchFromGitHub {
+    owner = "jacksonliam";
+    repo = "mjpg-streamer";
+    rev = "4060cb64e3557037fd404d10e1c1d076b672e9e8";
+    sha256 = "0g7y832jsz4ylmq9qp2l4fq6bm8l6dhsbi60fr5jfqpx4l0pia8m";
   };
 
-  patchPhase = ''
-    substituteInPlace Makefile "make -C plugins\/input_gspcav1" "# make -C plugins\/input_gspcav1"
-    substituteInPlace Makefile "cp plugins\/input_gspcav1\/input_gspcav1.so" "# cp plugins\/input_gspcav1\/input_gspcav1.so"
+  prePatch = ''
+    cd mjpg-streamer-experimental
   '';
 
-  postFixup = ''
-    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib:$out/lib/plugins" $out/bin/mjpg_streamer
-  '';
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ libjpeg ];
 
-  makeFlags = "DESTDIR=$(out)";
-
-  preInstall = ''
-    mkdir -p $out/{bin,lib}
+  postFixup = ''
+    patchelf --set-rpath "$(patchelf --print-rpath $out/bin/mjpg_streamer):$out/lib/mjpg-streamer" $out/bin/mjpg_streamer
   '';
 
-  buildInputs = [ pkgconfig libjpeg imagemagick libv4l ];
-  
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://sourceforge.net/projects/mjpg-streamer/;
     description = "MJPG-streamer takes JPGs from Linux-UVC compatible webcams, filesystem or other input plugins and streams them as M-JPEG via HTTP to webbrowsers, VLC and other software";
+    platforms = platforms.linux;
+    licenses = licenses.gpl2;
   };
 }
diff --git a/pkgs/applications/video/mkvtoolnix/default.nix b/pkgs/applications/video/mkvtoolnix/default.nix
index cda861497e12..05bd5ad980bd 100644
--- a/pkgs/applications/video/mkvtoolnix/default.nix
+++ b/pkgs/applications/video/mkvtoolnix/default.nix
@@ -1,76 +1,54 @@
-{ stdenv, fetchurl, gettext, pkgconfig, ruby
-, boost, expat, file, flac, libebml, libmatroska, libogg, libvorbis, xdg_utils, zlib
-# pugixml (not packaged)
-, buildConfig ? "all"
-, withGUI ? false, qt5 ? null # Disabled for now until upstream issues are resolved
-, legacyGUI ? true, wxGTK ? null
-# For now both qt5 and wxwidgets gui's are enabled, if wxwidgets is disabled the
-# build system doesn't install desktop entries, icons, etc...
-, libiconv
+{ stdenv, fetchgit, pkgconfig, autoconf, automake
+, ruby, file, xdg_utils, gettext, expat, qt5, boost
+, libebml, zlib, libmatroska, libogg, libvorbis, flac
+, withGUI ? true
 }:
 
-let
-  inherit (stdenv.lib) enableFeature optional;
-in
-
 assert withGUI -> qt5 != null;
-assert legacyGUI -> wxGTK != null;
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
   name = "mkvtoolnix-${version}";
-  version = "8.4.0";
+  version = "8.9.0";
 
-  src = fetchurl {
-    url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
-    sha256 = "0y7qm8q9vpvjiw7b69k9140pw9nhvs6ggmk56yxnmcd02inm19gn";
+  src = fetchgit {
+    url = "https://github.com/mbunkus/mkvtoolnix.git";
+    rev = "54e6b52b3dde07f89da4542997ef059e18802128";
+    sha256 = "1hm9f9q60c0axmmlsalazsiil8gk3v8q6cl5qxsfa95m51i39878";
   };
 
-  patchPhase = ''
-    patchShebangs ./rake.d/
-    patchShebangs ./Rakefile
-    # Force ruby encoding to use UTF-8 or else when enabling qt5 the Rakefile may
-    # fail with `invalid byte sequence in US-ASCII' due to UTF-8 characters
-    # This workaround replaces an arbitrary comment in the drake file
-    sed -e 's,#--,Encoding.default_external = Encoding::UTF_8,' -i ./drake
-  '';
-
-  configureFlags = [
-    "--with-boost-libdir=${boost.lib}/lib"
-    "--without-curl"
-  ] ++ (
-    if (withGUI || legacyGUI) then [
-      "--with-mkvtoolnix-gui"
-      "--enable-gui"
-      (enableFeature withGUI "qt")
-      (enableFeature legacyGUI "wxwidgets")
-    ] else [
-      "--disable-gui"
-    ]
-  );
-
-  nativeBuildInputs = [ gettext pkgconfig ruby ];
+  nativeBuildInputs = [ gettext ruby ];
 
   buildInputs = [
-    boost expat file flac libebml libmatroska libogg libvorbis xdg_utils zlib
-  ] ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ]
-    ++ optional withGUI qt5
-    ++ optional legacyGUI wxGTK;
-
-  enableParallelBuilding = true;
+    pkgconfig autoconf automake expat
+    file xdg_utils boost libebml zlib
+    libmatroska libogg libvorbis flac
+    (optional withGUI qt5.qtbase)
+  ];
 
-  buildPhase = ''
-    ./drake
-  '';
+  preConfigure = "./autogen.sh; patchShebangs .";
+  buildPhase   = "./drake -j $NIX_BUILD_CORES";
+  installPhase = "./drake install -j $NIX_BUILD_CORES";
 
-  installPhase = ''
-    ./drake install
-  '';
+  configureFlags = [
+    "--enable-magic"
+    "--enable-optimization"
+    "--with-boost-libdir=${boost.lib}/lib"
+    "--disable-debug"
+    "--disable-profiling"
+    "--disable-precompiled-headers"
+    "--disable-static-qt"
+    "--without-curl"
+    "--with-gettext"
+    (enableFeature withGUI "qt")
+  ];
 
   meta = with stdenv.lib; {
     description = "Cross-platform tools for Matroska";
-    homepage = http://www.bunkus.org/videotools/mkvtoolnix/;
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ codyopel fuuzetsu ];
-    platforms = platforms.all;
+    homepage    = http://www.bunkus.org/videotools/mkvtoolnix/;
+    license     = licenses.gpl2;
+    maintainers = with maintainers; [ codyopel fuuzetsu rnhmjoj ];
+    platforms   = platforms.linux;
   };
 }
diff --git a/pkgs/applications/video/pitivi/default.nix b/pkgs/applications/video/pitivi/default.nix
index f135630a9a1b..d488a3718b74 100644
--- a/pkgs/applications/video/pitivi/default.nix
+++ b/pkgs/applications/video/pitivi/default.nix
@@ -23,7 +23,6 @@ in stdenv.mkDerivation rec {
     '';
     license     = licenses.lgpl21Plus;
     platforms   = platforms.linux;
-    maintainers = with maintainers; [ iyzsong ];
   };
 
   nativeBuildInputs = [ pkgconfig intltool itstool makeWrapper ];
diff --git a/pkgs/applications/video/popcorntime/default.nix b/pkgs/applications/video/popcorntime/default.nix
index e74c8e9a5a8d..f2bc3e701618 100644
--- a/pkgs/applications/video/popcorntime/default.nix
+++ b/pkgs/applications/video/popcorntime/default.nix
@@ -1,53 +1,43 @@
-{ lib, stdenv, fetchurl, runCommand, makeWrapper, nwjs, zip }:
+{ lib, stdenv, fetchurl, makeWrapper, nwjs, zip }:
 
 let
-  version = "0.3.8-3";
+  arch = if stdenv.system == "x86_64-linux" then "64"
+    else if stdenv.system == "i686-linux"   then "32" 
+    else throw "Unsupported system ${stdenv.system}";
 
-  popcorntimePackage = stdenv.mkDerivation rec {
-    name = "popcorntime-${version}";
-    src = if stdenv.system == "x86_64-linux" then
-        fetchurl {
-          url = "http://get.popcorntime.io/build/Popcorn-Time-${version}-Linux-64.tar.xz";
-          sha256 = "0q8c6m9majgv5a6hjl1b2ndmq4xx05zbarsydhqkivhh9aymvxgm";
-        }
-      else if stdenv.system == "i686-linux" then
-        fetchurl {
-          url = "https://get.popcorntime.io/build/Popcorn-Time-${version}-Linux-32.tar.xz";
-          sha256 = "1dz1cp31qbwamm9pf8ydmzzhnb6d9z73bigdv3y74dgicz3dpr92";
-        }
-      else throw "Unsupported system ${stdenv.system}";
+in stdenv.mkDerivation rec {
+  name = "popcorntime-${version}";
+  version = "0.3.9";
 
-    sourceRoot = ".";
+  src = fetchurl {
+    url = "http://get.popcorntime.sh/build/Popcorn-Time-${version}-Linux-${arch}.tar.xz";
+    sha256 =
+      if arch == "64"
+      then "0qaqdz45frgiy440jyz6hikhklx2yp08qp94z82r03dkbf4a2hvx"
+      else "0y08a42pm681s97lkczdq5dblxl2jbr850hnl85hknl3ynag9kq4";
+  };
 
-    buildInputs = [ zip ];
+  dontPatchELF = true;
+  sourceRoot   = "linux${arch}";
+  buildInputs  = [ zip makeWrapper ];
 
-    buildPhase = ''
-      rm Popcorn-Time install
-      zip -r package.nw package.json src node_modules
-      cat ${nwjs}/bin/nw package.nw > Popcorn-Time
-      chmod 555 Popcorn-Time
-    '';
+  buildPhase = ''
+    rm Popcorn-Time
+    cat ${nwjs}/bin/nw nw.pak > Popcorn-Time
+    chmod 555 Popcorn-Time
+  '';
 
-    installPhase = ''
-      mkdir -p $out
-      cp -r * $out/
-    '';
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -r * $out/
+    makeWrapper $out/Popcorn-Time $out/bin/popcorntime
+  '';
 
-    dontPatchELF = true;
+  meta = with stdenv.lib; {
+    homepage = https://popcorntime.sh/;
+    description = "An application that streams movies and TV shows from torrents";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ bobvanderlinden rnhmjoj ];
   };
-in
-  runCommand "popcorntime-${version}" {
-    buildInputs = [ makeWrapper ];
-    meta = with stdenv.lib; {
-      homepage = http://popcorntime.io/;
-      description = "An application that streams movies and TV shows from torrents";
-      license = stdenv.lib.licenses.gpl3;
-      platforms = platforms.linux;
-      maintainers = with maintainers; [ bobvanderlinden ];
-      broken = true;  # popcorntime.io is dead
-    };
-  }
-  ''
-    mkdir -p $out/bin
-    makeWrapper ${popcorntimePackage}/Popcorn-Time $out/bin/popcorntime
-  ''
+}
diff --git a/pkgs/applications/video/subtitleeditor/default.nix b/pkgs/applications/video/subtitleeditor/default.nix
index 7c42aebf2bcf..c9655e2a4f27 100644
--- a/pkgs/applications/video/subtitleeditor/default.nix
+++ b/pkgs/applications/video/subtitleeditor/default.nix
@@ -1,44 +1,65 @@
-{ stdenv, fetchurl, desktop_file_utils, enchant, gnome, gstreamer, gstreamermm,
-  gst_plugins_base, gst_plugins_good, intltool, hicolor_icon_theme,
-  libsigcxx, libxmlxx, makeWrapper, xdg_utils, pkgconfig } :
+{ stdenv, fetchurl, pkgconfig, autoconf, automake114x, intltool,
+  desktop_file_utils, enchant, gnome3, gst_all_1, hicolor_icon_theme,
+  libsigcxx, libxmlxx, xdg_utils, isocodes, wrapGAppsHook } :
 
 let
-  ver_maj = "0.41";
-  ver_min = "0";
+  ver_maj = "0.52";
+  ver_min = "1";
 in
 
 stdenv.mkDerivation rec {
   name = "subtitle-editor-${ver_maj}.${ver_min}";
 
-  buildInputs =  [
-    desktop_file_utils enchant gnome.gtk gnome.gtkmm gstreamer gstreamermm
-    gst_plugins_base gst_plugins_good intltool hicolor_icon_theme libsigcxx libxmlxx
-    makeWrapper xdg_utils pkgconfig
-  ];
-
   src = fetchurl {
     url = "http://download.gna.org/subtitleeditor/${ver_maj}/subtitleeditor-${ver_maj}.${ver_min}.tar.gz";
-    md5 = "3c21ccd8296001dcb1a02c62396db1b6";
+    sha256 = "1m8j2i27kjaycvp09b0knp9in61jd2dj852hrx5hvkrby70mygjv";
   };
 
+  nativeBuildInputs =  [
+    autoconf automake114x pkgconfig intltool wrapGAppsHook
+  ];
+
+  buildInputs =  [
+    desktop_file_utils
+    enchant
+    gnome3.gtk
+    gnome3.gtkmm
+    gst_all_1.gstreamer
+    gst_all_1.gstreamermm
+    gst_all_1.gst-plugins-base
+    gst_all_1.gst-plugins-good
+    hicolor_icon_theme
+    libsigcxx
+    libxmlxx
+    xdg_utils
+    isocodes
+  ];
+
+  NIX_CFLAGS_COMPILE = "-std=c++11 -DDEBUG";
+
+  enableParallelBuilding = true;
+
   doCheck = true;
 
-  postInstall = ''
-    wrapProgram "$out/bin/subtitleeditor" --prefix \
-      GST_PLUGIN_SYSTEM_PATH ":" "$GST_PLUGIN_SYSTEM_PATH"                                                     \
+  patches = [ ./subtitleeditor-0.52.1-build-fix.patch ];
+
+  preConfigure = ''
+    # ansi overrides -std, see src_configure
+    sed 's/\(CXXFLAGS\) -ansi/\1/' -i configure.ac configure
   '';
 
+  configureFlags = [ "--disable-debug" ];
 
   meta = {
-    description = "GTK+2 application to edit video subtitles";
+    description = "GTK+3 application to edit video subtitles";
     longDescription = ''
-      Subtitle Editor is a GTK+2 tool to edit subtitles for GNU/Linux/*BSD. It can be
-      used for new subtitles or as a tool to transform, edit, correct and refine
-      existing subtitle. This program also shows sound waves, which makes it easier
-      to synchronise subtitles to voices.
+      Subtitle Editor is a GTK+3 tool to edit subtitles for GNU/Linux/*BSD. It
+      can be used for new subtitles or as a tool to transform, edit, correct
+      and refine existing subtitle. This program also shows sound waves, which
+      makes it easier to synchronise subtitles to voices.
       '';
     homepage = http://home.gna.org/subtitleeditor;
-    license = stdenv.lib.licenses.gpl3;
+    license = stdenv.lib.licenses.gpl3Plus;
     maintainers = [ stdenv.lib.maintainers.plcplc ];
     platforms = stdenv.lib.platforms.linux;
   };
diff --git a/pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patch b/pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patch
new file mode 100644
index 000000000000..9cce5d2d98f2
--- /dev/null
+++ b/pkgs/applications/video/subtitleeditor/subtitleeditor-0.52.1-build-fix.patch
@@ -0,0 +1,55 @@
+Fix build errors with gcc-4.9.3 -std=c++11 (after disabling -ansi)
+
+https://gna.org/bugs/?23714
+
+https://bugs.gentoo.org/show_bug.cgi?id=550764
+https://bugs.gentoo.org/show_bug.cgi?id=566328
+
+--- a/src/subtitleview.cc	2015-12-24 01:52:29.322622155 +0100
++++ b/src/subtitleview.cc	2015-12-24 01:52:44.210491213 +0100
+@@ -1363,7 +1363,7 @@
+ 	{
+ 		int num;
+ 		std::istringstream ss(event->string);
+-		bool is_num = ss >> num != 0; 
++		bool is_num = static_cast<bool>(ss >> num) != 0; 
+ 		// Update only if it's different
+ 		if(is_num != get_enable_search())
+ 			set_enable_search(is_num);
+--- a/src/utility.h	2015-12-24 01:49:42.205104858 +0100
++++ b/src/utility.h	2015-12-24 01:50:23.387737071 +0100
+@@ -91,7 +91,7 @@
+ 	std::istringstream s(src);
+ 	// return s >> dest != 0;
+ 
+-	bool state = s >> dest != 0;
++	bool state = static_cast<bool>(s >> dest) != 0;
+ 
+ 	if(!state)
+ 		se_debug_message(SE_DEBUG_UTILITY, "string:'%s'failed.", src.c_str());
+--- a/plugins/actions/dialoguize/dialoguize.cc	2015-12-24 01:06:24.125428454 +0100
++++ b/plugins/actions/dialoguize/dialoguize.cc	2015-12-24 01:06:42.630277006 +0100
+@@ -23,7 +23,7 @@
+  *	along with this program. If not, see <http://www.gnu.org/licenses/>.
+  */
+  
+-#include <auto_ptr.h>
++#include <memory>
+ #include "extension/action.h"
+ #include "i18n.h"
+ #include "debug.h"
+--- a/plugins/actions/documentmanagement/documentmanagement.old	2015-12-24 01:17:13.914730337 +0100
++++ b/plugins/actions/documentmanagement/documentmanagement.cc	2015-12-24 01:17:23.339640430 +0100
+@@ -178,9 +178,9 @@
+ 
+ 		ui_id = ui->new_merge_id();
+ 
+-		#define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/"name, name, name);
+-		#define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/"name, name, name);
+-		#define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/"name, name, name);
++		#define ADD_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/" name, name, name);
++		#define ADD_OPEN_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-open/" name, name, name);
++		#define ADD_SAVE_UI(name) ui->add_ui(ui_id, "/menubar/menu-file/menu-save/" name, name, name);
+ 
+ 		ADD_UI("new-document");
+ 		ADD_OPEN_UI("open-document");
diff --git a/pkgs/applications/video/vlc/default.nix b/pkgs/applications/video/vlc/default.nix
index 1c9164e99613..a84f24a303a2 100644
--- a/pkgs/applications/video/vlc/default.nix
+++ b/pkgs/applications/video/vlc/default.nix
@@ -27,7 +27,10 @@ stdenv.mkDerivation rec {
     sha256 = "1dazxbmzx2g5570pkg519a7fsj07rdr155kjsw7b9y8npql33lls";
   };
 
-  # outputs TODO: some modules are "corrupt", even without splitting vlc
+  # Comment-out the Qt 5.5 version check, as we do apply the relevant patch.
+  # https://trac.videolan.org/vlc/ticket/16497
+  postPatch = if (!withQt5) then null else
+    "sed '/I78ef29975181ee22429c9bd4b11d96d9e68b7a9c/s/^/: #/' -i configure";
 
   buildInputs =
     [ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread