git.iko.soy/typeable/nixpkgs
on master help sign in
mpv: fix on darwin
commit637412e37345ec204af6f388ab0b77664f38fa2a authorVincent Laporte <Vincent.Laporte@gmail.com> dateWed 24 Aug 2016, 21:35 (10 years ago) parentb8ed622
1 file changed+14−8
pkgs/applications/video/mpv/default.nix+14−8
pkgs/applications/video/mpv/default.nix+14−8
@@ -1,7 +1,7 @@
11{ stdenv, fetchurl, fetchFromGitHub, makeWrapper
22, docutils, perl, pkgconfig, python3, which, ffmpeg
33, freefont_ttf, freetype, libass, libpthreadstubs
4−, lua, lua5_sockets, libuchardet, rubberband
4+, lua, lua5_sockets, libuchardet, libiconv ? null, darwin
55
66, x11Support ? true,
77 mesa ? null,
@@ -13,18 +13,19 @@
1313 wayland ? null,
1414 libxkbcommon ? null
1515
16+, rubberbandSupport ? !stdenv.isDarwin, rubberband ? null
1617, xineramaSupport ? true, libXinerama ? null
1718, xvSupport ? true, libXv ? null
1819, sdl2Support ? true, SDL2 ? null
19−, alsaSupport ? true, alsaLib ? null
20+, alsaSupport ? !stdenv.isDarwin, alsaLib ? null
2021, screenSaverSupport ? true, libXScrnSaver ? null
2122, vdpauSupport ? true, libvdpau ? null
22−, dvdreadSupport ? true, libdvdread ? null
23−, dvdnavSupport ? true, libdvdnav ? null
23+, dvdreadSupport ? !stdenv.isDarwin, libdvdread ? null
24+, dvdnavSupport ? dvdreadSupport, libdvdnav ? null
2425, bluraySupport ? true, libbluray ? null
2526, speexSupport ? true, speex ? null
2627, theoraSupport ? true, libtheora ? null
27−, pulseSupport ? true, libpulseaudio ? null
28+, pulseSupport ? !stdenv.isDarwin, libpulseaudio ? null
2829, bs2bSupport ? true, libbs2b ? null
2930, cacaSupport ? true, libcaca ? null
3031, libpngSupport ? true, libpng ? null
@@ -39,11 +40,12 @@
3940
4041with stdenv.lib;
4142
42−let
43+let
4344 available = x: x != null;
4445in
4546assert x11Support -> all available [mesa libX11 libXext libXxf86vm];
4647assert waylandSupport -> all available [wayland libxkbcommon];
48+assert rubberbandSupport -> available rubberband;
4749assert xineramaSupport -> x11Support && available libXinerama;
4850assert xvSupport -> x11Support && available libXv;
4951assert sdl2Support -> available SDL2;
@@ -109,7 +111,7 @@ in stdenv.mkDerivation rec {
109111
110112 buildInputs = [
111113 ffmpeg freetype libass libpthreadstubs
112− lua lua5_sockets libuchardet rubberband
114+ lua lua5_sockets libuchardet
113115 ] ++ optional alsaSupport alsaLib
114116 ++ optional xvSupport libXv
115117 ++ optional theoraSupport libtheora
@@ -118,6 +120,10 @@ in stdenv.mkDerivation rec {
118120 ++ optional bluraySupport libbluray
119121 ++ optional jackaudioSupport libjack2
120122 ++ optional pulseSupport libpulseaudio
123+ ++ optional stdenv.isDarwin libiconv
124+ ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
125+ Cocoa CoreAudio ])
126+ ++ optional rubberbandSupport rubberband
121127 ++ optional screenSaverSupport libXScrnSaver
122128 ++ optional vdpauSupport libvdpau
123129 ++ optional speexSupport speex
@@ -158,7 +164,7 @@ in stdenv.mkDerivation rec {
158164 homepage = http://mpv.io;
159165 license = licenses.gpl2Plus;
160166 maintainers = with maintainers; [ AndersonTorres fuuzetsu ];
161− platforms = platforms.linux;
167+ platforms = platforms.darwin ++ platforms.linux;
162168
163169 longDescription = ''
164170 mpv is a free and open-source general-purpose video player,