nixpkgs/pkgs/applications/video/vlc/default.nix

72 lines
2.4 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, xz, bzip2, perl, xorg, libdvdnav, libbluray
, zlib, a52dec, libmad, faad2, ffmpeg, alsaLib
2014-11-17 17:33:10 -08:00
, pkgconfig, dbus, fribidi, freefont_ttf, libebml, libmatroska
, libvorbis, libtheora, speex, lua5, libgcrypt, libupnp
, libcaca, libpulseaudio, flac, schroedinger, libxml2, librsvg
, mpeg2dec, udev, gnutls, avahi, libcddb, libjack2, SDL, SDL_image
, libmtp, unzip, taglib, libkate, libtiger, libv4l, samba, liboggz
2013-04-07 11:03:30 -07:00
, libass, libva, libdvbpsi, libdc1394, libraw1394, libopus
, libvdpau, libsamplerate
2014-11-17 17:33:10 -08:00
, onlyLibVLC ? false
2015-09-27 08:01:11 -07:00
, qt4 ? null
, withQt5 ? false, qtbase ? null
, jackSupport ? false
}:
2014-11-17 17:33:10 -08:00
with stdenv.lib;
2015-09-27 08:01:11 -07:00
assert (withQt5 -> qtbase != null);
2015-02-28 14:23:58 -08:00
assert (!withQt5 -> qt4 != null);
2014-11-17 17:33:10 -08:00
stdenv.mkDerivation rec {
2013-09-26 07:37:49 -07:00
name = "vlc-${version}";
2015-05-10 22:34:53 -07:00
version = "2.2.1";
src = fetchurl {
2014-12-19 06:22:31 -08:00
url = "http://download.videolan.org/vlc/${version}/${name}.tar.xz";
2015-05-10 22:34:53 -07:00
sha256 = "1jqzrzrpw6932lbkf863xk8cfmn4z2ngbxz7w8ggmh4f6xz9sgal";
};
buildInputs =
[ 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
libupnp libcaca libpulseaudio flac schroedinger libxml2 librsvg mpeg2dec
udev gnutls avahi libcddb SDL SDL_image libmtp unzip taglib
libkate libtiger libv4l samba liboggz libass libdvbpsi libva
xorg.xlibsWrapper xorg.libXv xorg.libXvMC xorg.libXpm xorg.xcbutilkeysyms
libdc1394 libraw1394 libopus libebml libmatroska libvdpau libsamplerate
]
2015-09-27 08:01:11 -07:00
++ [(if withQt5 then qtbase else qt4)]
++ optional jackSupport libjack2;
nativeBuildInputs = [ pkgconfig ];
configureFlags =
[ "--enable-alsa"
"--with-kde-solid=$out/share/apps/solid/actions"
"--enable-dc1394"
2014-03-23 09:24:12 -07:00
"--enable-ncurses"
"--enable-vdpau"
"--enable-dvdnav"
"--enable-samplerate"
2014-11-17 17:33:10 -08:00
]
++ optional onlyLibVLC "--disable-vlc";
preConfigure = ''sed -e "s@/bin/echo@echo@g" -i configure'';
enableParallelBuilding = true;
preBuild = ''
substituteInPlace modules/text_renderer/freetype.c --replace \
/usr/share/fonts/truetype/freefont/FreeSerifBold.ttf \
${freefont_ttf}/share/fonts/truetype/FreeSerifBold.ttf
'';
2013-12-08 10:19:11 -08:00
meta = with stdenv.lib; {
description = "Cross-platform media player and streaming server";
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;
};
}