mpv: fix on darwin
This commit is contained in:
parent
b8ed622bbb
commit
637412e373
@ -1,7 +1,7 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
|
{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
|
||||||
, docutils, perl, pkgconfig, python3, which, ffmpeg
|
, docutils, perl, pkgconfig, python3, which, ffmpeg
|
||||||
, freefont_ttf, freetype, libass, libpthreadstubs
|
, freefont_ttf, freetype, libass, libpthreadstubs
|
||||||
, lua, lua5_sockets, libuchardet, rubberband
|
, lua, lua5_sockets, libuchardet, libiconv ? null, darwin
|
||||||
|
|
||||||
, x11Support ? true,
|
, x11Support ? true,
|
||||||
mesa ? null,
|
mesa ? null,
|
||||||
@ -13,18 +13,19 @@
|
|||||||
wayland ? null,
|
wayland ? null,
|
||||||
libxkbcommon ? null
|
libxkbcommon ? null
|
||||||
|
|
||||||
|
, rubberbandSupport ? !stdenv.isDarwin, rubberband ? null
|
||||||
, xineramaSupport ? true, libXinerama ? null
|
, xineramaSupport ? true, libXinerama ? null
|
||||||
, xvSupport ? true, libXv ? null
|
, xvSupport ? true, libXv ? null
|
||||||
, sdl2Support ? true, SDL2 ? null
|
, sdl2Support ? true, SDL2 ? null
|
||||||
, alsaSupport ? true, alsaLib ? null
|
, alsaSupport ? !stdenv.isDarwin, alsaLib ? null
|
||||||
, screenSaverSupport ? true, libXScrnSaver ? null
|
, screenSaverSupport ? true, libXScrnSaver ? null
|
||||||
, vdpauSupport ? true, libvdpau ? null
|
, vdpauSupport ? true, libvdpau ? null
|
||||||
, dvdreadSupport ? true, libdvdread ? null
|
, dvdreadSupport ? !stdenv.isDarwin, libdvdread ? null
|
||||||
, dvdnavSupport ? true, libdvdnav ? null
|
, dvdnavSupport ? dvdreadSupport, libdvdnav ? null
|
||||||
, bluraySupport ? true, libbluray ? null
|
, bluraySupport ? true, libbluray ? null
|
||||||
, speexSupport ? true, speex ? null
|
, speexSupport ? true, speex ? null
|
||||||
, theoraSupport ? true, libtheora ? null
|
, theoraSupport ? true, libtheora ? null
|
||||||
, pulseSupport ? true, libpulseaudio ? null
|
, pulseSupport ? !stdenv.isDarwin, libpulseaudio ? null
|
||||||
, bs2bSupport ? true, libbs2b ? null
|
, bs2bSupport ? true, libbs2b ? null
|
||||||
, cacaSupport ? true, libcaca ? null
|
, cacaSupport ? true, libcaca ? null
|
||||||
, libpngSupport ? true, libpng ? null
|
, libpngSupport ? true, libpng ? null
|
||||||
@ -39,11 +40,12 @@
|
|||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
available = x: x != null;
|
available = x: x != null;
|
||||||
in
|
in
|
||||||
assert x11Support -> all available [mesa libX11 libXext libXxf86vm];
|
assert x11Support -> all available [mesa libX11 libXext libXxf86vm];
|
||||||
assert waylandSupport -> all available [wayland libxkbcommon];
|
assert waylandSupport -> all available [wayland libxkbcommon];
|
||||||
|
assert rubberbandSupport -> available rubberband;
|
||||||
assert xineramaSupport -> x11Support && available libXinerama;
|
assert xineramaSupport -> x11Support && available libXinerama;
|
||||||
assert xvSupport -> x11Support && available libXv;
|
assert xvSupport -> x11Support && available libXv;
|
||||||
assert sdl2Support -> available SDL2;
|
assert sdl2Support -> available SDL2;
|
||||||
@ -109,7 +111,7 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
ffmpeg freetype libass libpthreadstubs
|
ffmpeg freetype libass libpthreadstubs
|
||||||
lua lua5_sockets libuchardet rubberband
|
lua lua5_sockets libuchardet
|
||||||
] ++ optional alsaSupport alsaLib
|
] ++ optional alsaSupport alsaLib
|
||||||
++ optional xvSupport libXv
|
++ optional xvSupport libXv
|
||||||
++ optional theoraSupport libtheora
|
++ optional theoraSupport libtheora
|
||||||
@ -118,6 +120,10 @@ in stdenv.mkDerivation rec {
|
|||||||
++ optional bluraySupport libbluray
|
++ optional bluraySupport libbluray
|
||||||
++ optional jackaudioSupport libjack2
|
++ optional jackaudioSupport libjack2
|
||||||
++ optional pulseSupport libpulseaudio
|
++ optional pulseSupport libpulseaudio
|
||||||
|
++ optional stdenv.isDarwin libiconv
|
||||||
|
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||||
|
Cocoa CoreAudio ])
|
||||||
|
++ optional rubberbandSupport rubberband
|
||||||
++ optional screenSaverSupport libXScrnSaver
|
++ optional screenSaverSupport libXScrnSaver
|
||||||
++ optional vdpauSupport libvdpau
|
++ optional vdpauSupport libvdpau
|
||||||
++ optional speexSupport speex
|
++ optional speexSupport speex
|
||||||
@ -158,7 +164,7 @@ in stdenv.mkDerivation rec {
|
|||||||
homepage = http://mpv.io;
|
homepage = http://mpv.io;
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ AndersonTorres fuuzetsu ];
|
maintainers = with maintainers; [ AndersonTorres fuuzetsu ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.darwin ++ platforms.linux;
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
mpv is a free and open-source general-purpose video player,
|
mpv is a free and open-source general-purpose video player,
|
||||||
|
Loading…
Reference in New Issue
Block a user