From e81589e2c1bd0a983ba0b45540e352905307e1c4 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 18 Sep 2014 05:59:50 +0400 Subject: [PATCH] cmplayer: add package --- pkgs/applications/video/cmplayer/default.nix | 84 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 + 2 files changed, 88 insertions(+) create mode 100644 pkgs/applications/video/cmplayer/default.nix diff --git a/pkgs/applications/video/cmplayer/default.nix b/pkgs/applications/video/cmplayer/default.nix new file mode 100644 index 000000000000..3acb66089f96 --- /dev/null +++ b/pkgs/applications/video/cmplayer/default.nix @@ -0,0 +1,84 @@ +{ stdenv, fetchurl, fetchpatch, pkgconfig, python2, perl +, libX11, libxcb, qt5, mesa +, ffmpeg +, libchardet +, mpg123 +, libass +, libdvdread +, libdvdnav +, icu +, libquvi +, alsaLib +, libvdpau, libva +, libbluray +, jackSupport ? false, jack ? null +, portaudioSupport ? false, portaudio ? null +, pulseSupport ? true, pulseaudio ? null +, cddaSupport ? false, libcdda ? null +}: + +assert jackSupport -> jack != null; +assert portaudioSupport -> portaudio != null; +assert pulseSupport -> pulseaudio != null; +assert cddaSupport -> libcdda != null; + +stdenv.mkDerivation rec { + name = "cmplayer-${version}"; + version = "0.8.16"; + + src = fetchurl { + url = "https://github.com/xylosper/cmplayer/releases/download/v${version}/${name}-source.tar.gz"; + sha256 = "1yppp0jbq3mwa7vq4sjmm2lsqnfcv4n7cjap50gc2bavq7qynr85"; + }; + + patches = [ (fetchpatch { + url = "https://github.com/xylosper/cmplayer/commit/f6de1c7537dc3a0b4c9d69a63653c9bb4af26948.patch"; + sha256 = "09ss9bm9z29nqzvdw6a1wv572fl64af1qv55h0wicr6vp0v491h9"; + }) + ]; + + buildInputs = with stdenv.lib; + [ libX11 libxcb qt5 mesa + ffmpeg + libchardet + mpg123 + libass + libdvdread + libdvdnav + icu + libquvi + alsaLib + libvdpau + libva + libbluray + ] + ++ optional jackSupport jack + ++ optional portaudioSupport portaudio + ++ optional pulseSupport pulseaudio + ++ optional cddaSupport libcdda + ; + + preConfigure = "patchShebangs ./configure"; + + configureFlags = with stdenv.lib; + [ "--qmake=qmake" ] + ++ optional jackSupport "--enable-jack" + ++ optional portaudioSupport "--enable-portaudio" + ++ optional pulseSupport "--enable-pulseaudio" + ++ optional cddaSupport "--enable-cdda" + ; + + preBuild = "patchShebangs ./build-mpv"; + + nativeBuildInputs = [ pkgconfig python2 perl ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Powerful and easy-to-use multimedia player"; + homepage = http://cmplayer.github.io; + license = licenses.gpl2Plus; + maintainers = [ maintainers.abbradar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c12dff9825ea..e5cd7c4eadbb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8522,6 +8522,10 @@ let clipit = callPackage ../applications/misc/clipit { }; + cmplayer = callPackage ../applications/video/cmplayer { + pulseSupport = config.pulseaudio or false; + }; + cmus = callPackage ../applications/audio/cmus { }; compiz = callPackage ../applications/window-managers/compiz {