2015-09-15 02:26:18 -07:00
|
|
|
{ stdenv, fetchurl, xz, bzip2, perl, xorg, libdvdnav, libbluray
|
2011-08-01 02:23:10 -07:00
|
|
|
, zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
|
2014-11-17 17:33:10 -08:00
|
|
|
, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska
|
2012-01-26 00:36:18 -08:00
|
|
|
, libvorbis, libtheora, speex, lua5, libgcrypt, libupnp
|
2015-05-27 12:42:15 -07:00
|
|
|
, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg
|
2015-06-27 00:17:52 -07:00
|
|
|
, mpeg2dec, udev, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
|
2011-02-09 13:11:30 -08:00
|
|
|
, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
|
2013-04-07 11:03:30 -07:00
|
|
|
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
|
2015-12-01 09:04:38 -08:00
|
|
|
, libvdpau, libsamplerate, live555, fluidsynth
|
2014-11-17 17:33:10 -08:00
|
|
|
, onlyLibVLC ? false
|
2015-09-27 08:01:11 -07:00
|
|
|
, qt4 ? null
|
2016-04-12 00:45:44 -07:00
|
|
|
, withQt5 ? false, qtbase ? null, qtx11extras ? null
|
2015-06-24 03:19:37 -07:00
|
|
|
, jackSupport ? false
|
2006-06-29 05:41:25 -07:00
|
|
|
}:
|
2003-12-03 13:58:16 -08:00
|
|
|
|
2014-11-17 17:33:10 -08:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-04-12 00:45:44 -07:00
|
|
|
assert (withQt5 -> qtbase != null && qtx11extras != null);
|
2015-02-28 14:23:58 -08:00
|
|
|
assert (!withQt5 -> qt4 != null);
|
2014-11-17 17:33:10 -08:00
|
|
|
|
2011-02-09 13:11:30 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2013-09-26 07:37:49 -07:00
|
|
|
name = "vlc-${version}";
|
2016-05-24 13:11:45 -07:00
|
|
|
version = "2.2.3";
|
2011-02-09 13:11:30 -08:00
|
|
|
|
2003-12-03 13:58:16 -08:00
|
|
|
src = fetchurl {
|
2016-02-07 04:18:48 -08:00
|
|
|
url = "http://get.videolan.org/vlc/${version}/${name}.tar.xz";
|
2016-05-24 13:11:45 -07:00
|
|
|
sha256 = "0nxzspnyzlm17imlggi8ypnwiizi0f5wrj3436c3qg7i6mymimxr";
|
2003-12-03 13:58:16 -08:00
|
|
|
};
|
|
|
|
|
2016-03-28 05:35:47 -07:00
|
|
|
# Comment-out the Qt 5.5 version check, as we do apply the relevant patch.
|
|
|
|
# https://trac.videolan.org/vlc/ticket/16497
|
|
|
|
postPatch = if (!withQt5) then null else
|
|
|
|
"sed '/I78ef29975181ee22429c9bd4b11d96d9e68b7a9c/s/^/: #/' -i configure";
|
|
|
|
|
2012-02-15 07:42:59 -08:00
|
|
|
buildInputs =
|
2012-02-22 12:29:33 -08:00
|
|
|
[ xz bzip2 perl zlib a52dec libmad faad2 ffmpeg alsaLib libdvdnav libdvdnav.libdvdread
|
2014-11-17 17:33:10 -08:00
|
|
|
libbluray dbus fribidi libvorbis libtheora speex lua5 libgcrypt
|
2015-05-27 12:42:15 -07:00
|
|
|
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
|
2015-06-24 03:19:37 -07:00
|
|
|
udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib
|
2012-02-15 07:42:59 -08:00
|
|
|
libkate libtiger libv4l samba liboggz libass libdvbpsi libva
|
2015-09-15 02:26:18 -07:00
|
|
|
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
|
2015-10-26 06:40:23 -07:00
|
|
|
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate live555
|
2015-12-01 09:04:38 -08:00
|
|
|
fluidsynth
|
2015-06-24 03:19:37 -07:00
|
|
|
]
|
2015-09-27 08:01:11 -07:00
|
|
|
++ [(if withQt5 then qtbase else qt4)]
|
2016-04-12 00:45:44 -07:00
|
|
|
++ optional withQt5 qtx11extras
|
2015-06-27 00:17:52 -07:00
|
|
|
++ optional jackSupport libjack2;
|
2006-06-29 16:48:19 -07:00
|
|
|
|
2012-12-28 10:20:09 -08:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2012-01-26 00:36:18 -08:00
|
|
|
|
2015-10-26 06:40:23 -07:00
|
|
|
LIVE555_PREFIX = live555;
|
|
|
|
|
2012-02-15 07:42:59 -08:00
|
|
|
configureFlags =
|
|
|
|
[ "--enable-alsa"
|
|
|
|
"--with-kde-solid=$out/share/apps/solid/actions"
|
2012-05-08 02:49:38 -07:00
|
|
|
"--enable-dc1394"
|
2014-03-23 09:24:12 -07:00
|
|
|
"--enable-ncurses"
|
2014-04-01 14:52:52 -07:00
|
|
|
"--enable-vdpau"
|
2015-05-14 20:26:16 -07:00
|
|
|
"--enable-dvdnav"
|
2015-09-17 15:57:52 -07:00
|
|
|
"--enable-samplerate"
|
2014-11-17 17:33:10 -08:00
|
|
|
]
|
|
|
|
++ optional onlyLibVLC "--disable-vlc";
|
2012-02-15 07:42:59 -08:00
|
|
|
|
2012-02-18 09:23:17 -08:00
|
|
|
preConfigure = ''sed -e "s@/bin/echo@echo@g" -i configure'';
|
|
|
|
|
2012-02-15 07:42:59 -08:00
|
|
|
enableParallelBuilding = true;
|
2009-03-10 15:45:27 -07:00
|
|
|
|
|
|
|
preBuild = ''
|
2012-02-22 12:29:33 -08:00
|
|
|
substituteInPlace modules/text_renderer/freetype.c --replace \
|
2009-03-10 15:45:27 -07:00
|
|
|
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf \
|
|
|
|
${freefont_ttf}/share/fonts/truetype/FreeSerifBold.ttf
|
|
|
|
'';
|
2006-10-12 03:53:16 -07:00
|
|
|
|
2013-12-08 10:19:11 -08:00
|
|
|
meta = with stdenv.lib; {
|
2006-10-12 03:53:16 -07:00
|
|
|
description = "Cross-platform media player and streaming server";
|
2007-12-31 09:55:13 -08:00
|
|
|
homepage = http://www.videolan.org/vlc/;
|
2013-12-08 10:19:11 -08:00
|
|
|
platforms = platforms.linux;
|
2014-02-16 07:30:30 -08:00
|
|
|
license = licenses.lgpl21Plus;
|
2006-10-12 03:53:16 -07:00
|
|
|
};
|
2003-12-03 13:58:16 -08:00
|
|
|
}
|