mpv: 0.25.0 -> 0.26.0

Add option for archive support and fix dvdread and dvdnav support.
This commit is contained in:
Johannes Frankenau 2017-07-23 11:00:00 +02:00
parent 2fb3cc1e6d
commit 7e62e8d036

View File

@ -33,6 +33,7 @@
, vaapiSupport ? true, libva ? null
, drmSupport ? !stdenv.isDarwin, libdrm ? null
, vapoursynthSupport ? false, vapoursynth ? null
, archiveSupport ? false, libarchive ? null
, jackaudioSupport ? false, libjack2 ? null
# scripts you want to be loaded by default
@ -65,6 +66,7 @@ assert libpngSupport -> available libpng;
assert youtubeSupport -> available youtube-dl;
assert vapoursynthSupport -> available vapoursynth;
assert jackaudioSupport -> available libjack2;
assert archiveSupport -> available libarchive;
assert vaapiSupport -> available libva;
assert drmSupport -> available libdrm;
@ -79,13 +81,13 @@ let
};
in stdenv.mkDerivation rec {
name = "mpv-${version}";
version = "0.25.0";
version = "0.26.0";
src = fetchFromGitHub {
owner = "mpv-player";
repo = "mpv";
rev = "v${version}";
sha256 = "16r3fyq472hzxnh6g3gm520pmw1ybslaki3pqjm2d9jnd2md1pa5";
sha256 = "0d9pvsknjqmxj907y85fxh9xcbb5dafw2bh7rpwhgs9x4wdrbvv0";
};
patchPhase = ''
@ -101,6 +103,9 @@ in stdenv.mkDerivation rec {
"--disable-libmpv-static"
"--disable-static-build"
"--disable-build-date" # Purity
(enableFeature archiveSupport "libarchive")
(enableFeature dvdreadSupport "dvdread")
(enableFeature dvdnavSupport "dvdnav")
(enableFeature vaapiSupport "vaapi")
(enableFeature waylandSupport "wayland")
];
@ -136,6 +141,7 @@ in stdenv.mkDerivation rec {
++ optional vaapiSupport libva
++ optional drmSupport libdrm
++ optional vapoursynthSupport vapoursynth
++ optional archiveSupport libarchive
++ optionals dvdnavSupport [ libdvdnav libdvdnav.libdvdread ]
++ optionals x11Support [ libX11 libXext mesa libXxf86vm ]
++ optionals waylandSupport [ wayland libxkbcommon ];
@ -154,7 +160,7 @@ in stdenv.mkDerivation rec {
ln -s ${freefont_ttf}/share/fonts/truetype/FreeSans.ttf $out/share/mpv/subfont.ttf
# Ensure youtube-dl is available in $PATH for MPV
wrapProgram $out/bin/mpv \
--add-flags "--script=${concatStringsSep "," scripts}" \
--add-flags "--scripts=${concatStringsSep "," scripts}" \
'' + optionalString youtubeSupport ''
--prefix PATH : "${youtube-dl}/bin" \
'' + optionalString vapoursynthSupport ''