From 7e62e8d036c4673a76bd24ce1cf9425ec0c84869 Mon Sep 17 00:00:00 2001 From: Johannes Frankenau Date: Sun, 23 Jul 2017 11:00:00 +0200 Subject: [PATCH] mpv: 0.25.0 -> 0.26.0 Add option for archive support and fix dvdread and dvdnav support. --- pkgs/applications/video/mpv/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix index 674d6f46690b..d21a8ab6dcc9 100644 --- a/pkgs/applications/video/mpv/default.nix +++ b/pkgs/applications/video/mpv/default.nix @@ -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 ''