1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/applications/video/xbmc/default.nix

105 lines
3.5 KiB
Nix
Raw Normal View History

2013-01-05 21:07:47 +00:00
{ stdenv, lib, fetchurl, makeWrapper
, pkgconfig, cmake, gnumake, yasm, pythonFull
2013-12-29 10:15:13 +00:00
, boost, avahi, libdvdcss, lame, autoreconfHook
, gettext, pcre, yajl, fribidi, which
2013-03-12 00:35:16 +00:00
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
, libX11, xproto, inputproto, libxml2
2013-01-05 21:07:47 +00:00
, libXt, libXmu, libXext, xextproto
, libXinerama, libXrandr, randrproto
, libXtst, libXfixes, fixesproto, systemd
2013-01-05 21:07:47 +00:00
, SDL, SDL_image, SDL_mixer, alsaLib
, mesa, glew, fontconfig, freetype, ftgl
, libjpeg, jasper, libpng, libtiff
, ffmpeg, libmpeg2, libsamplerate, libmad
, libogg, libvorbis, flac, libxslt
, lzo, libcdio, libmodplug, libass, libbluray
, sqlite, mysql, nasm, gnutls, libva
2013-01-05 21:07:47 +00:00
, curl, bzip2, zip, unzip, glxinfo, xdpyinfo
, dbus_libs ? null, dbusSupport ? true
, udev, udevSupport ? true
, libusb ? null, usbSupport ? false
, samba ? null, sambaSupport ? true
2013-09-29 20:17:26 +01:00
, libmicrohttpd
2013-01-05 21:07:47 +00:00
# TODO: would be nice to have nfsSupport (needs libnfs library)
# TODO: librtmp
2013-01-05 21:07:47 +00:00
, libvdpau ? null, vdpauSupport ? true
, pulseaudio ? null, pulseSupport ? true
2013-01-05 21:07:47 +00:00
}:
assert dbusSupport -> dbus_libs != null;
assert udevSupport -> udev != null;
assert usbSupport -> libusb != null && ! udevSupport; # libusb won't be used if udev is avaliable
assert sambaSupport -> samba != null;
assert vdpauSupport -> libvdpau != null && ffmpeg.vdpauSupport;
assert pulseSupport -> pulseaudio != null;
2013-01-05 21:07:47 +00:00
stdenv.mkDerivation rec {
2014-06-09 19:42:49 +01:00
name = "xbmc-13.1";
2013-01-05 21:07:47 +00:00
src = fetchurl {
2014-06-09 19:42:49 +01:00
url = "https://github.com/xbmc/xbmc/archive/13.1-Gotham.tar.gz";
sha256 = "0y56c5csfp8xhk088g47m3bzrri73z868yfx6b04gnrdmr760jrl";
2013-01-05 21:07:47 +00:00
};
buildInputs = [
makeWrapper libxml2 gnutls
pkgconfig cmake gnumake yasm pythonFull
2013-12-29 10:15:13 +00:00
boost libmicrohttpd autoreconfHook
gettext pcre yajl fribidi libva
2013-03-12 00:35:16 +00:00
openssl gperf tinyxml2 taglib libssh swig jre
2013-12-29 10:15:13 +00:00
libX11 xproto inputproto which
2013-01-05 21:07:47 +00:00
libXt libXmu libXext xextproto
libXinerama libXrandr randrproto
libXtst libXfixes fixesproto
SDL SDL_image SDL_mixer alsaLib
mesa glew fontconfig freetype ftgl
libjpeg jasper libpng libtiff
ffmpeg libmpeg2 libsamplerate libmad
libogg libvorbis flac libxslt systemd
lzo libcdio libmodplug libass libbluray
sqlite mysql nasm avahi libdvdcss lame
2013-01-05 21:07:47 +00:00
curl bzip2 zip unzip glxinfo xdpyinfo
]
++ lib.optional dbusSupport dbus_libs
++ lib.optional udevSupport udev
++ lib.optional usbSupport libusb
++ lib.optional sambaSupport samba
++ lib.optional vdpauSupport libvdpau
++ lib.optional pulseSupport pulseaudio;
2013-01-05 21:07:47 +00:00
dontUseCmakeConfigure = true;
2013-06-21 08:13:38 +01:00
preConfigure = ''
substituteInPlace xbmc/linux/LinuxTimezone.cpp \
--replace 'usr/share/zoneinfo' 'etc/zoneinfo'
2013-12-29 10:15:13 +00:00
./bootstrap
2013-06-21 08:13:38 +01:00
'';
2013-01-05 21:07:47 +00:00
configureFlags = [
"--enable-external-libraries"
]
++ lib.optional (! sambaSupport) "--disable-samba"
++ lib.optional vdpauSupport "--enable-vdpau"
++ lib.optional pulseSupport "--enable-pulse";
2013-01-05 21:07:47 +00:00
postInstall = ''
for p in $(ls $out/bin/) ; do
wrapProgram $out/bin/$p \
--prefix PATH ":" "${pythonFull}/bin" \
2013-01-05 21:07:47 +00:00
--prefix PATH ":" "${glxinfo}/bin" \
--prefix PATH ":" "${xdpyinfo}/bin" \
--prefix LD_LIBRARY_PATH ":" "${curl}/lib" \
--prefix LD_LIBRARY_PATH ":" "${systemd}/lib" \
--prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib"
2013-01-05 21:07:47 +00:00
done
'';
meta = {
homepage = http://xbmc.org/;
description = "XBMC Media Center";
license = "GPLv2";
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.iElectric ];
2013-01-05 21:07:47 +00:00
};
}