parent
dd9fcdce1d
commit
7a8cdc66a4
|
@ -1,7 +1,7 @@
|
||||||
{ stdenv, fetchurl, fetchgit, freetype, pkgconfig, freefont_ttf, ffmpeg, libass
|
{ stdenv, fetchurl, fetchgit, freetype, pkgconfig, freefont_ttf, ffmpeg, libass
|
||||||
, lua, perl, libpthreadstubs
|
, lua, perl, libpthreadstubs
|
||||||
, lua5_sockets
|
, lua5_sockets
|
||||||
, python3, docutils, which
|
, python3, docutils, which, lib
|
||||||
, x11Support ? true, libX11 ? null, libXext ? null, mesa ? null, libXxf86vm ? null
|
, x11Support ? true, libX11 ? null, libXext ? null, mesa ? null, libXxf86vm ? null
|
||||||
, xineramaSupport ? true, libXinerama ? null
|
, xineramaSupport ? true, libXinerama ? null
|
||||||
, xvSupport ? true, libXv ? null
|
, xvSupport ? true, libXv ? null
|
||||||
|
@ -20,8 +20,9 @@
|
||||||
# For screenshots
|
# For screenshots
|
||||||
, libpngSupport ? true, libpng ? null
|
, libpngSupport ? true, libpng ? null
|
||||||
# for Youtube support
|
# for Youtube support
|
||||||
, quviSupport? false, libquvi ? null
|
, quviSupport ? false, libquvi ? null
|
||||||
, cacaSupport? false, libcaca ? null
|
, cacaSupport ? false, libcaca ? null
|
||||||
|
, vaapiSupport ? false, libva ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert x11Support -> (libX11 != null && libXext != null && mesa != null && libXxf86vm != null);
|
assert x11Support -> (libX11 != null && libXext != null && mesa != null && libXxf86vm != null);
|
||||||
|
@ -57,11 +58,11 @@ in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "mpv-${version}";
|
name = "mpv-${version}";
|
||||||
version = "0.4.1";
|
version = "0.5.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
|
url = "https://github.com/mpv-player/mpv/archive/v${version}.tar.gz";
|
||||||
sha256 = "0wqjyzw3kk854zj263k7jyykzfaz1g27z50aqrd26hylg8k135cn";
|
sha256 = "17mmc6xm8yir2p379h00q3wy7rplz2s31h6sxswmzbh72xf10g96";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = with stdenv.lib;
|
buildInputs = with stdenv.lib;
|
||||||
|
@ -84,6 +85,7 @@ stdenv.mkDerivation rec {
|
||||||
++ optional quviSupport libquvi
|
++ optional quviSupport libquvi
|
||||||
++ optional sdl2Support SDL2
|
++ optional sdl2Support SDL2
|
||||||
++ optional cacaSupport libcaca
|
++ optional cacaSupport libcaca
|
||||||
|
++ optional vaapiSupport libva
|
||||||
;
|
;
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 lua perl ];
|
nativeBuildInputs = [ python3 lua perl ];
|
||||||
|
@ -97,7 +99,7 @@ stdenv.mkDerivation rec {
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
python3 ${waf} configure --prefix=$out
|
python3 ${waf} configure --prefix=$out ${lib.optionalString vaapiSupport "--enable-vaapi"}
|
||||||
patchShebangs TOOLS
|
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: Wayland support
|
||||||
# TODO: investigate libquvi support
|
# TODO: investigate libquvi problems (related to Youtube support)
|
||||||
# TODO: investigate caca support
|
# TODO: investigate caca support
|
||||||
# TODO: investigate lua5_sockets bug
|
# TODO: investigate lua5_sockets bug
|
||||||
|
|
|
@ -9273,9 +9273,10 @@ let
|
||||||
|
|
||||||
mpv = callPackage ../applications/video/mpv {
|
mpv = callPackage ../applications/video/mpv {
|
||||||
lua = lua5_1;
|
lua = lua5_1;
|
||||||
bs2bSupport = true;
|
bs2bSupport = config.mpv.bs2bSupport or true;
|
||||||
quviSupport = true;
|
quviSupport = config.mpv.quviSupport or false;
|
||||||
cacaSupport = true;
|
cacaSupport = config.mpv.cacaSupport or true;
|
||||||
|
vaapiSupport = config.mpv.vaapiSupport or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mrxvt = callPackage ../applications/misc/mrxvt { };
|
mrxvt = callPackage ../applications/misc/mrxvt { };
|
||||||
|
|
Loading…
Reference in New Issue