summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@gmail.com>2014-08-10 21:14:41 -0300
committerAndersonTorres <torres.anderson.85@gmail.com>2014-08-18 08:14:26 -0300
commit7a8cdc66a4cb132b26028ec0d1128c47572d9fac (patch)
tree03545090f76264313a3085aab7d411eae24c7096
parentdd9fcdce1db34276d99fcdce470a99eea7300b62 (diff)
downloadnixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar.gz
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar.bz2
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar.lz
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar.xz
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.tar.zst
nixpkgs-7a8cdc66a4cb132b26028ec0d1128c47572d9fac.zip
MPV: update to 0.5.0
Many thanks matejc for the commit!
-rw-r--r--pkgs/applications/video/mpv/default.nix18
-rw-r--r--pkgs/top-level/all-packages.nix7
2 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index 4eec9afdbf3..db1ced49166 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -1,7 +1,7 @@
 { stdenv, fetchurl, fetchgit, freetype, pkgconfig, freefont_ttf, ffmpeg, libass
 , lua, perl, libpthreadstubs
 , lua5_sockets
-, python3, docutils, which
+, python3, docutils, which, lib
 , x11Support ? true, libX11 ? null, libXext ? null, mesa ? null, libXxf86vm ? null
 , xineramaSupport ? true, libXinerama ? null
 , xvSupport ? true, libXv ? null
@@ -20,8 +20,9 @@
 # For screenshots
 , libpngSupport ? true, libpng ? null
 # for Youtube support
-, quviSupport? false, libquvi ? null
-, cacaSupport? false, libcaca ? null
+, quviSupport ? false, libquvi ? null
+, cacaSupport ? false, libcaca ? null
+, vaapiSupport ? false, libva ? null
 }:
 
 assert x11Support -> (libX11 != null && libXext != null && mesa != null && libXxf86vm != null);
@@ -57,11 +58,11 @@ in
 
 stdenv.mkDerivation rec {
   name = "mpv-${version}";
-  version = "0.4.1";
+  version = "0.5.0";
 
   src = fetchurl {
     url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
-    sha256 = "0wqjyzw3kk854zj263k7jyykzfaz1g27z50aqrd26hylg8k135cn";
+    sha256 = "17mmc6xm8yir2p379h00q3wy7rplz2s31h6sxswmzbh72xf10g96";
   };
 
   buildInputs = with stdenv.lib;
@@ -84,6 +85,7 @@ stdenv.mkDerivation rec {
     ++ optional quviSupport libquvi
     ++ optional sdl2Support SDL2
     ++ optional cacaSupport libcaca
+    ++ optional vaapiSupport libva
     ;
 
   nativeBuildInputs = [ python3 lua perl ];
@@ -97,7 +99,7 @@ stdenv.mkDerivation rec {
   enableParallelBuilding = true;
 
   configurePhase = ''
-    python3 ${waf} configure --prefix=$out
+    python3 ${waf} configure --prefix=$out ${lib.optionalString vaapiSupport "--enable-vaapi"}
     patchShebangs TOOLS
   '';
 
@@ -124,9 +126,9 @@ stdenv.mkDerivation rec {
   };
 }
 
-# Heavily based on mplayer2 expression
+# Many thanks @matejc for this update: 0.5.0 and vaapi (experimental)
 
 # TODO: Wayland support
-# TODO: investigate libquvi support
+# TODO: investigate libquvi problems (related to Youtube support)
 # TODO: investigate caca support
 # TODO: investigate lua5_sockets bug
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 312959fdb24..43301c91d54 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9273,9 +9273,10 @@ let
 
   mpv = callPackage ../applications/video/mpv {
     lua = lua5_1;
-    bs2bSupport = true;
-    quviSupport = true;
-    cacaSupport = true;
+    bs2bSupport = config.mpv.bs2bSupport or true;
+    quviSupport = config.mpv.quviSupport or false;
+    cacaSupport = config.mpv.cacaSupport or true;
+    vaapiSupport = config.mpv.vaapiSupport or false;
   };
 
   mrxvt = callPackage ../applications/misc/mrxvt { };