Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
This commit is contained in:
Mateusz Kowalczyk 2014-09-20 23:00:41 +01:00
commit c7bbc288b5
5 changed files with 160 additions and 21 deletions

View File

@ -0,0 +1,80 @@
{ 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 = [ ./fix-gcc48.patch ];
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

@ -0,0 +1,22 @@
From f6de1c7537dc3a0b4c9d69a63653c9bb4af26948 Mon Sep 17 00:00:00 2001
From: xylosper <darklin20@gmail.com>
Date: Wed, 2 Jul 2014 11:57:05 +0900
Subject: [PATCH] add a space between user defined literal operator
---
src/cmplayer/stdafx.hpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmplayer/stdafx.hpp b/src/cmplayer/stdafx.hpp
index 5f7d49c..c724f08 100644
--- a/src/cmplayer/stdafx.hpp
+++ b/src/cmplayer/stdafx.hpp
@@ -52,7 +52,7 @@ SIA operator "" _q(const char16_t *str, size_t len) -> QString
SIA operator "" _a(const char *str, size_t len) -> QLatin1String
{ return QLatin1String(str, len); }
-SIA operator ""_b(const char *str, size_t len) -> QByteArray
+SIA operator "" _b(const char *str, size_t len) -> QByteArray
{ return QByteArray::fromRawData(str, len); }
SIA operator "" _8(const char *str, size_t len) -> QString

View File

@ -1,37 +1,47 @@
{stdenv, fetchgit, autoconf, automake, libtool, libaacs ? null, jdk ? null, ant ? null, withAACS ? false}:
{ stdenv, fetchurl, pkgconfig
, withAACS ? false, libaacs ? null, jdk ? null, ant ? null
, withMetadata ? true, libxml2 ? null
, withFonts ? true, freetype ? null
}:
assert withAACS -> jdk != null && ant != null && libaacs != null;
assert withMetadata -> libxml2 != null;
assert withFonts -> freetype != null;
# Info on how to use:
# https://wiki.archlinux.org/index.php/BluRay
let baseName = "libbluray";
version = "0.2.1";
stdenv.mkDerivation rec {
baseName = "libbluray";
version = "0.6.0";
name = "${baseName}-${version}";
in
stdenv.mkDerivation {
name = "${baseName}-${version}p1";
src = fetchgit {
url = git://git.videolan.org/libbluray.git;
rev = "3b9a9f044644a6abe9cb09377f714ded9fdd6c87";
sha256 = "551b623e76c2dba44b5490fb42ccdc491b28cd42841de28237b8edbed0f0711c";
src = fetchurl {
url = "ftp://ftp.videolan.org/pub/videolan/${baseName}/${version}/${name}.tar.bz2";
sha256 = "0zsk16p7rxwbyizm87i7x2fcy3gwjfnlfd2gi2n17fv6gajvsyv2";
};
nativeBuildInputs = [autoconf automake libtool];
buildInputs = stdenv.lib.optionals withAACS [jdk ant libaacs];
NIX_LDFLAGS = stdenv.lib.optionalString withAACS "-laacs";
nativeBuildInputs = with stdenv.lib;
[pkgconfig]
++ optional withAACS ant
;
preConfigure = "./bootstrap";
configureFlags = ["--disable-static"] ++ stdenv.lib.optionals withAACS ["--enable-bdjava" "--with-jdk=${jdk}"];
buildInputs = with stdenv.lib;
optionals withAACS [jdk libaacs]
++ optional withMetadata libxml2
++ optional withFonts freetype
;
# From Handbrake
patches = [ ./A01-filter-dup.patch ];
configureFlags = with stdenv.lib;
optionals withAACS ["--enable-bdjava" "--with-jdk=${jdk}"]
++ optional (! withMetadata) "--without-libxml2"
++ optional (! withFonts) "--without-freetype"
;
meta = {
meta = with stdenv.lib; {
homepage = http://www.videolan.org/developers/libbluray.html;
description = "Library to access Blu-Ray disks for video playback";
license = stdenv.lib.licenses.lgpl21;
license = licenses.lgpl21;
maintainers = [ maintainers.abbradar ];
};
}

View File

@ -0,0 +1,21 @@
{ stdenv, fetchurl, perl }:
stdenv.mkDerivation rec {
name = "libchardet-1.0.4";
src = fetchurl {
url = "ftp://ftp.oops.org/pub/oops/libchardet/${name}.tar.bz2";
sha256 = "0cvwba4la25qw70ap8jd5r743a9jshqd26nnbh5ph68zj1imlgzl";
};
nativeBuildInputs = [ perl ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Mozilla's Universal Charset Detector C/C++ API";
homepage = ftp://ftp.oops.org/pub/oops/libchardet/index.html;
license = licenses.mpl11;
maintainers = [ maintainers.abbradar ];
};
}

View File

@ -5317,6 +5317,8 @@ let
libchamplain_0_6 = callPackage ../development/libraries/libchamplain/0.6.nix {};
libchardet = callPackage ../development/libraries/libchardet { };
libchop = callPackage ../development/libraries/libchop { };
libcm = callPackage ../development/libraries/libcm { };
@ -8609,6 +8611,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 {