Merge pull request #145509 from SuperSandro2000/mpv
This commit is contained in:
commit
e476113f29
1 changed files with 55 additions and 86 deletions
|
@ -19,95 +19,63 @@
|
||||||
, nv-codec-headers
|
, nv-codec-headers
|
||||||
, lua
|
, lua
|
||||||
, libuchardet
|
, libuchardet
|
||||||
, libiconv ? null
|
, libiconv
|
||||||
, CoreFoundation, Cocoa, CoreAudio, MediaPlayer
|
, CoreFoundation, Cocoa, CoreAudio, MediaPlayer
|
||||||
|
|
||||||
, waylandSupport ? stdenv.isLinux
|
, waylandSupport ? stdenv.isLinux
|
||||||
, wayland ? null
|
, wayland
|
||||||
, wayland-protocols ? null
|
, wayland-protocols
|
||||||
, libxkbcommon ? null
|
, libxkbcommon
|
||||||
|
|
||||||
, x11Support ? stdenv.isLinux
|
, x11Support ? stdenv.isLinux
|
||||||
, libGLU, libGL ? null
|
, libGLU, libGL
|
||||||
, libX11 ? null
|
, libX11
|
||||||
, libXext ? null
|
, libXext
|
||||||
, libXxf86vm ? null
|
, libXxf86vm
|
||||||
, libXrandr ? null
|
, libXrandr
|
||||||
|
|
||||||
, cddaSupport ? false
|
, cddaSupport ? false
|
||||||
, libcdio ? null
|
, libcdio
|
||||||
, libcdio-paranoia ? null
|
, libcdio-paranoia
|
||||||
|
|
||||||
, vulkanSupport ? stdenv.isLinux
|
, vulkanSupport ? stdenv.isLinux
|
||||||
, libplacebo ? null
|
, libplacebo
|
||||||
, shaderc ? null
|
, shaderc
|
||||||
, vulkan-headers ? null
|
, vulkan-headers
|
||||||
, vulkan-loader ? null
|
, vulkan-loader
|
||||||
|
|
||||||
, drmSupport ? stdenv.isLinux
|
, drmSupport ? stdenv.isLinux
|
||||||
, libdrm ? null
|
, libdrm
|
||||||
, mesa ? null
|
, mesa
|
||||||
|
|
||||||
, alsaSupport ? stdenv.isLinux, alsa-lib ? null
|
, alsaSupport ? stdenv.isLinux, alsa-lib
|
||||||
, archiveSupport ? true, libarchive ? null
|
, archiveSupport ? true, libarchive
|
||||||
, bluraySupport ? true, libbluray ? null
|
, bluraySupport ? true, libbluray
|
||||||
, bs2bSupport ? true, libbs2b ? null
|
, bs2bSupport ? true, libbs2b
|
||||||
, cacaSupport ? true, libcaca ? null
|
, cacaSupport ? true, libcaca
|
||||||
, cmsSupport ? true, lcms2 ? null
|
, cmsSupport ? true, lcms2
|
||||||
, dvdnavSupport ? stdenv.isLinux, libdvdnav ? null
|
, dvdnavSupport ? stdenv.isLinux, libdvdnav
|
||||||
, jackaudioSupport ? false, libjack2 ? null
|
, jackaudioSupport ? false, libjack2
|
||||||
, libpngSupport ? true, libpng ? null
|
, libpngSupport ? true, libpng
|
||||||
, openalSupport ? true, openalSoft ? null
|
, openalSupport ? true, openalSoft
|
||||||
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null
|
, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio
|
||||||
, rubberbandSupport ? stdenv.isLinux, rubberband ? null
|
, rubberbandSupport ? stdenv.isLinux, rubberband
|
||||||
, screenSaverSupport ? true, libXScrnSaver ? null
|
, screenSaverSupport ? true, libXScrnSaver
|
||||||
, sdl2Support ? true, SDL2 ? null
|
, sdl2Support ? true, SDL2
|
||||||
, sixelSupport ? false, libsixel ? null
|
, sixelSupport ? false, libsixel
|
||||||
, speexSupport ? true, speex ? null
|
, speexSupport ? true, speex
|
||||||
, swiftSupport ? false, swift ? null
|
, swiftSupport ? false, swift
|
||||||
, theoraSupport ? true, libtheora ? null
|
, theoraSupport ? true, libtheora
|
||||||
, vaapiSupport ? stdenv.isLinux, libva ? null
|
, vaapiSupport ? stdenv.isLinux, libva
|
||||||
, vapoursynthSupport ? false, vapoursynth ? null
|
, vapoursynthSupport ? false, vapoursynth
|
||||||
, vdpauSupport ? true, libvdpau ? null
|
, vdpauSupport ? true, libvdpau
|
||||||
, xineramaSupport ? stdenv.isLinux, libXinerama ? null
|
, xineramaSupport ? stdenv.isLinux, libXinerama
|
||||||
, xvSupport ? stdenv.isLinux, libXv ? null
|
, xvSupport ? stdenv.isLinux, libXv
|
||||||
, zimgSupport ? true, zimg ? null
|
, zimgSupport ? true, zimg
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
|
||||||
available = x: x != null;
|
|
||||||
in
|
|
||||||
assert alsaSupport -> available alsa-lib;
|
|
||||||
assert archiveSupport -> available libarchive;
|
|
||||||
assert bluraySupport -> available libbluray;
|
|
||||||
assert bs2bSupport -> available libbs2b;
|
|
||||||
assert cacaSupport -> available libcaca;
|
|
||||||
assert cddaSupport -> all available [ libcdio libcdio-paranoia ];
|
|
||||||
assert cmsSupport -> available lcms2;
|
|
||||||
assert drmSupport -> all available [ libdrm mesa ];
|
|
||||||
assert dvdnavSupport -> available libdvdnav;
|
|
||||||
assert jackaudioSupport -> available libjack2;
|
|
||||||
assert libpngSupport -> available libpng;
|
|
||||||
assert openalSupport -> available openalSoft;
|
|
||||||
assert pulseSupport -> available libpulseaudio;
|
|
||||||
assert rubberbandSupport -> available rubberband;
|
|
||||||
assert screenSaverSupport -> available libXScrnSaver;
|
|
||||||
assert sdl2Support -> available SDL2;
|
|
||||||
assert sixelSupport -> available libsixel;
|
|
||||||
assert speexSupport -> available speex;
|
|
||||||
assert theoraSupport -> available libtheora;
|
|
||||||
assert vaapiSupport -> available libva;
|
|
||||||
assert vapoursynthSupport -> available vapoursynth;
|
|
||||||
assert vdpauSupport -> available libvdpau;
|
|
||||||
assert vulkanSupport -> all available [ libplacebo shaderc vulkan-headers vulkan-loader ];
|
|
||||||
assert waylandSupport -> all available [ wayland wayland-protocols libxkbcommon ];
|
|
||||||
assert x11Support -> all available [ libGLU libGL libX11 libXext libXxf86vm libXrandr ];
|
|
||||||
assert xineramaSupport -> x11Support && available libXinerama;
|
|
||||||
assert xvSupport -> x11Support && available libXv;
|
|
||||||
assert zimgSupport -> available zimg;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
luaEnv = lua.withPackages (ps: with ps; [ luasocket ]);
|
luaEnv = lua.withPackages (ps: with ps; [ luasocket ]);
|
||||||
|
|
||||||
|
@ -127,8 +95,9 @@ in stdenv.mkDerivation rec {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs ./TOOLS/
|
patchShebangs ./TOOLS/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext "
|
NIX_LDFLAGS = lib.optionalString x11Support "-lX11 -lXext "
|
||||||
+ lib.optionalString stdenv.isDarwin "-framework CoreFoundation";
|
+ lib.optionalString stdenv.isDarwin "-framework CoreFoundation";
|
||||||
|
|
||||||
wafConfigureFlags = [
|
wafConfigureFlags = [
|
||||||
"--enable-libmpv-shared"
|
"--enable-libmpv-shared"
|
||||||
|
@ -227,18 +196,6 @@ in stdenv.mkDerivation rec {
|
||||||
addOpenGLRunpath $out/bin/mpv
|
addOpenGLRunpath $out/bin/mpv
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://mpv.io";
|
|
||||||
description = "General-purpose media player, fork of MPlayer and mplayer2";
|
|
||||||
longDescription = ''
|
|
||||||
mpv is a free and open-source general-purpose video player, based on the
|
|
||||||
MPlayer and mplayer2 projects, with great improvements above both.
|
|
||||||
'';
|
|
||||||
license = licenses.gpl2Plus;
|
|
||||||
maintainers = with maintainers; [ AndersonTorres fpletz globin ma27 tadeokondrak ];
|
|
||||||
platforms = platforms.darwin ++ platforms.linux;
|
|
||||||
};
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit
|
inherit
|
||||||
# The wrapper consults luaEnv and lua.version
|
# The wrapper consults luaEnv and lua.version
|
||||||
|
@ -252,4 +209,16 @@ in stdenv.mkDerivation rec {
|
||||||
vapoursynth
|
vapoursynth
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://mpv.io";
|
||||||
|
description = "General-purpose media player, fork of MPlayer and mplayer2";
|
||||||
|
longDescription = ''
|
||||||
|
mpv is a free and open-source general-purpose video player, based on the
|
||||||
|
MPlayer and mplayer2 projects, with great improvements above both.
|
||||||
|
'';
|
||||||
|
license = licenses.gpl2Plus;
|
||||||
|
maintainers = with maintainers; [ AndersonTorres fpletz globin ma27 tadeokondrak ];
|
||||||
|
platforms = platforms.darwin ++ platforms.linux;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue