summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-09-05 17:46:05 +0100
committerGitHub <noreply@github.com>2018-09-05 17:46:05 +0100
commite480328bcdc034fb43f34b7eb3a8f058bffff010 (patch)
tree606d1a4f333fb9dec98f130c447ac35c653b9aca /pkgs/applications
parenta9a380b259df806bb351a2c4a013ed7858813988 (diff)
parent14837a8277e4b751d8a8154b656321e40a5e34d4 (diff)
downloadnixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar.gz
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar.bz2
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar.lz
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar.xz
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.tar.zst
nixpkgs-e480328bcdc034fb43f34b7eb3a8f058bffff010.zip
Merge pull request #46035 from geistesk/mpv-cdda
mpv: Added flag for cddaSupport to play Audio CDs
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/video/mpv/default.nix137
1 files changed, 72 insertions, 65 deletions
diff --git a/pkgs/applications/video/mpv/default.nix b/pkgs/applications/video/mpv/default.nix
index c384455d672..9d843a3bfef 100644
--- a/pkgs/applications/video/mpv/default.nix
+++ b/pkgs/applications/video/mpv/default.nix
@@ -3,42 +3,46 @@
 , freefont_ttf, freetype, libass, libpthreadstubs
 , lua, luasocket, libuchardet, libiconv ? null, darwin
 
-, x11Support ? stdenv.isLinux,
-    libGLU_combined       ? null,
-    libX11     ? null,
-    libXext    ? null,
-    libXxf86vm ? null,
-    libXrandr  ? null
-
 , waylandSupport ? false
   , wayland           ? null
   , wayland-protocols ? null
   , libxkbcommon      ? null
 
-, rubberbandSupport  ? true,  rubberband    ? null
-, xineramaSupport    ? true,  libXinerama   ? null
-, xvSupport          ? true,  libXv         ? null
-, sdl2Support        ? true,  SDL2          ? null
+, x11Support ? stdenv.isLinux
+  , libGLU_combined ? null
+  , libX11          ? null
+  , libXext         ? null
+  , libXxf86vm      ? null
+  , libXrandr       ? null
+
+, cddaSupport ? false
+  , libcdio          ? null
+  , libcdio-paranoia ? null
+
 , alsaSupport        ? true,  alsaLib       ? null
-, screenSaverSupport ? true,  libXScrnSaver ? null
-, cmsSupport         ? true,  lcms2         ? null
-, vdpauSupport       ? true,  libvdpau      ? null
-, dvdreadSupport     ? true,  libdvdread    ? null
-, dvdnavSupport      ? true,  libdvdnav     ? null
 , bluraySupport      ? true,  libbluray     ? null
-, speexSupport       ? true,  speex         ? null
-, theoraSupport      ? true,  libtheora     ? null
-, pulseSupport       ? true,  libpulseaudio ? null
 , bs2bSupport        ? true,  libbs2b       ? null
 , cacaSupport        ? true,  libcaca       ? null
+, cmsSupport         ? true,  lcms2         ? null
+, drmSupport         ? true,  libdrm        ? null
+, dvdnavSupport      ? true,  libdvdnav     ? null
+, dvdreadSupport     ? true,  libdvdread    ? null
 , libpngSupport      ? true,  libpng        ? null
-, youtubeSupport     ? true,  youtube-dl    ? null
+, pulseSupport       ? true,  libpulseaudio ? null
+, rubberbandSupport  ? true,  rubberband    ? null
+, screenSaverSupport ? true,  libXScrnSaver ? null
+, sdl2Support        ? true,  SDL2          ? null
+, speexSupport       ? true,  speex         ? null
+, theoraSupport      ? true,  libtheora     ? null
 , vaapiSupport       ? true,  libva         ? null
-, drmSupport         ? true,  libdrm        ? null
-, openalSupport      ? false, openalSoft    ? null
-, vapoursynthSupport ? false, vapoursynth   ? null
+, vdpauSupport       ? true,  libvdpau      ? null
+, xineramaSupport    ? true,  libXinerama   ? null
+, xvSupport          ? true,  libXv         ? null
+, youtubeSupport     ? true,  youtube-dl    ? null
 , archiveSupport     ? false, libarchive    ? null
 , jackaudioSupport   ? false, libjack2      ? null
+, openalSupport      ? false, openalSoft    ? null
+, vapoursynthSupport ? false, vapoursynth   ? null
 }:
 
 with stdenv.lib;
@@ -46,32 +50,33 @@ with stdenv.lib;
 let
   available = x: x != null;
 in
-assert x11Support         -> all available [libGLU_combined libX11 libXext libXxf86vm libXrandr];
-assert waylandSupport     -> all available [wayland wayland-protocols libxkbcommon];
-assert rubberbandSupport  -> available rubberband;
-assert xineramaSupport    -> x11Support && available libXinerama;
-assert xvSupport          -> x11Support && available libXv;
-assert sdl2Support        -> available SDL2;
 assert alsaSupport        -> available alsaLib;
-assert screenSaverSupport -> available libXScrnSaver;
-assert cmsSupport         -> available lcms2;
-assert vdpauSupport       -> available libvdpau;
-assert dvdreadSupport     -> available libdvdread;
-assert dvdnavSupport      -> available libdvdnav;
+assert archiveSupport     -> available libarchive;
 assert bluraySupport      -> available libbluray;
-assert speexSupport       -> available speex;
-assert theoraSupport      -> available libtheora;
-assert openalSupport      -> available openalSoft;
-assert pulseSupport       -> available libpulseaudio;
 assert bs2bSupport        -> available libbs2b;
 assert cacaSupport        -> available libcaca;
-assert libpngSupport      -> available libpng;
-assert youtubeSupport     -> available youtube-dl;
-assert vapoursynthSupport -> available vapoursynth;
+assert cddaSupport        -> all available [libcdio libcdio-paranoia];
+assert cmsSupport         -> available lcms2;
+assert drmSupport         -> available libdrm;
+assert dvdnavSupport      -> available libdvdnav;
+assert dvdreadSupport     -> available libdvdread;
 assert jackaudioSupport   -> available libjack2;
-assert archiveSupport     -> available libarchive;
+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 speexSupport       -> available speex;
+assert theoraSupport      -> available libtheora;
 assert vaapiSupport       -> available libva;
-assert drmSupport         -> available libdrm;
+assert vapoursynthSupport -> available vapoursynth;
+assert vdpauSupport       -> available libvdpau;
+assert waylandSupport     -> all available [ wayland wayland-protocols libxkbcommon ];
+assert x11Support         -> all available [ libGLU_combined libX11 libXext libXxf86vm libXrandr ];
+assert xineramaSupport    -> x11Support && available libXinerama;
+assert xvSupport          -> x11Support && available libXv;
+assert youtubeSupport     -> available youtube-dl;
 
 let
   # Purity: Waf is normally downloaded by bootstrap.py, but
@@ -115,13 +120,14 @@ in stdenv.mkDerivation rec {
     "--disable-static-build"
     "--disable-build-date" # Purity
     "--disable-macos-cocoa-cb" # Disable whilst Swift isn't supported
-    (enableFeature archiveSupport "libarchive")
-    (enableFeature dvdreadSupport "dvdread")
-    (enableFeature dvdnavSupport "dvdnav")
-    (enableFeature openalSupport "openal")
-    (enableFeature vaapiSupport "vaapi")
-    (enableFeature waylandSupport "wayland")
-    (enableFeature stdenv.isLinux "dvbin")
+    (enableFeature archiveSupport  "libarchive")
+    (enableFeature cddaSupport     "cdda")
+    (enableFeature dvdnavSupport   "dvdnav")
+    (enableFeature dvdreadSupport  "dvdread")
+    (enableFeature openalSupport   "openal")
+    (enableFeature vaapiSupport    "vaapi")
+    (enableFeature waylandSupport  "wayland")
+    (enableFeature stdenv.isLinux  "dvbin")
   ];
 
   configurePhase = ''
@@ -137,32 +143,33 @@ in stdenv.mkDerivation rec {
     ffmpeg_4 freetype libass libpthreadstubs
     lua luasocket libuchardet
   ] ++ optional alsaSupport        alsaLib
-    ++ optional xvSupport          libXv
-    ++ optional theoraSupport      libtheora
-    ++ optional xineramaSupport    libXinerama
-    ++ optional dvdreadSupport     libdvdread
+    ++ optional archiveSupport     libarchive
     ++ optional bluraySupport      libbluray
+    ++ optional bs2bSupport        libbs2b
+    ++ optional cacaSupport        libcaca
+    ++ optional cmsSupport         lcms2
+    ++ optional drmSupport         libdrm
+    ++ optional dvdreadSupport     libdvdread
     ++ optional jackaudioSupport   libjack2
+    ++ optional libpngSupport      libpng
+    ++ optional openalSupport      openalSoft
     ++ optional pulseSupport       libpulseaudio
     ++ optional rubberbandSupport  rubberband
     ++ optional screenSaverSupport libXScrnSaver
-    ++ optional cmsSupport        lcms2
-    ++ optional vdpauSupport       libvdpau
-    ++ optional speexSupport       speex
-    ++ optional bs2bSupport        libbs2b
-    ++ optional openalSupport      openalSoft
-    ++ optional libpngSupport      libpng
-    ++ optional youtubeSupport     youtube-dl
     ++ optional sdl2Support        SDL2
-    ++ optional cacaSupport        libcaca
+    ++ optional speexSupport       speex
+    ++ optional theoraSupport      libtheora
     ++ optional vaapiSupport       libva
-    ++ optional drmSupport         libdrm
     ++ optional vapoursynthSupport vapoursynth
-    ++ optional archiveSupport     libarchive
+    ++ optional vdpauSupport       libvdpau
+    ++ optional xineramaSupport    libXinerama
+    ++ optional xvSupport          libXv
+    ++ optional youtubeSupport     youtube-dl
     ++ optional stdenv.isDarwin    libiconv
+    ++ optionals cddaSupport       [ libcdio libcdio-paranoia ]
     ++ optionals dvdnavSupport     [ libdvdnav libdvdnav.libdvdread ]
-    ++ optionals x11Support        [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
     ++ optionals waylandSupport    [ wayland wayland-protocols libxkbcommon ]
+    ++ optionals x11Support        [ libX11 libXext libGLU_combined libXxf86vm libXrandr ]
     ++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
       CoreFoundation Cocoa CoreAudio
     ]);