cmplayer: add package

This commit is contained in:
Nikolay Amiantov 2014-09-18 05:59:50 +04:00
parent ab56d9c344
commit e81589e2c1
2 changed files with 88 additions and 0 deletions

View file

@ -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;
};
}

View file

@ -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 {