2013-01-05 22:07:47 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper
|
|
|
|
, pkgconfig, cmake, gnumake, yasm, python
|
2013-04-01 17:13:00 +02:00
|
|
|
, boost, avahi, libdvdcss, lame
|
2013-01-05 22:07:47 +01:00
|
|
|
, gettext, pcre, yajl, fribidi
|
2013-03-12 01:35:16 +01:00
|
|
|
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
|
2013-01-05 22:07:47 +01:00
|
|
|
, libX11, xproto, inputproto
|
|
|
|
, 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
|
|
|
|
, lzo, libcdio, libmodplug, libass
|
2013-02-16 23:23:15 +01:00
|
|
|
, sqlite, mysql, nasm
|
2013-01-05 22:07:47 +01:00
|
|
|
, curl, bzip2, zip, unzip, glxinfo, xdpyinfo
|
|
|
|
, dbus_libs ? null, dbusSupport ? true
|
|
|
|
, udev, udevSupport ? true
|
|
|
|
, libusb ? null, usbSupport ? false
|
|
|
|
, samba ? null, sambaSupport ? true
|
|
|
|
# TODO: would be nice to have nfsSupport (needs libnfs library)
|
2013-04-01 17:13:00 +02:00
|
|
|
# TODO: librtmp
|
2013-01-05 22:07:47 +01:00
|
|
|
, libvdpau ? null, vdpauSupport ? true
|
2013-04-01 17:13:00 +02:00
|
|
|
, pulseaudio ? null, pulseSupport ? false
|
2013-01-05 22:07:47 +01: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;
|
2013-04-01 17:13:00 +02:00
|
|
|
assert pulseSupport -> pulseaudio != null;
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-05-26 20:53:09 +02:00
|
|
|
name = "xbmc-12.2";
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://mirrors.xbmc.org/releases/source/${name}.tar.gz";
|
2013-05-26 20:53:09 +02:00
|
|
|
sha256 = "077apkq9sx6wlwkwmiz63w5dcqbbrbjbn6qk9fj2fgaizhs0ccxj";
|
2013-01-05 22:07:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
pkgconfig cmake gnumake yasm python
|
|
|
|
boost
|
|
|
|
gettext pcre yajl fribidi
|
2013-03-12 01:35:16 +01:00
|
|
|
openssl gperf tinyxml2 taglib libssh swig jre
|
2013-01-05 22:07:47 +01:00
|
|
|
libX11 xproto inputproto
|
|
|
|
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
|
|
|
|
lzo libcdio libmodplug libass
|
2013-04-01 17:13:00 +02:00
|
|
|
sqlite mysql nasm avahi libdvdcss lame
|
2013-01-05 22:07:47 +01:00
|
|
|
curl bzip2 zip unzip glxinfo xdpyinfo
|
|
|
|
]
|
|
|
|
++ lib.optional dbusSupport dbus_libs
|
|
|
|
++ lib.optional udevSupport udev
|
|
|
|
++ lib.optional usbSupport libusb
|
|
|
|
++ lib.optional sambaSupport samba
|
2013-04-01 17:13:00 +02:00
|
|
|
++ lib.optional vdpauSupport libvdpau
|
|
|
|
++ lib.optional pulseSupport pulseaudio;
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-external-libraries"
|
|
|
|
"--disable-webserver"
|
|
|
|
]
|
|
|
|
++ lib.optional (! sambaSupport) "--disable-samba"
|
2013-04-01 17:13:00 +02:00
|
|
|
++ lib.optional vdpauSupport "--enable-vdpau"
|
|
|
|
++ lib.optional pulseSupport "--enable-pulse";
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for p in $(ls $out/bin/) ; do
|
|
|
|
wrapProgram $out/bin/$p \
|
|
|
|
--prefix PATH ":" "${python}/bin" \
|
|
|
|
--prefix PATH ":" "${glxinfo}/bin" \
|
|
|
|
--prefix PATH ":" "${xdpyinfo}/bin" \
|
2013-01-21 19:05:08 +01:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${curl}/lib" \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib"
|
2013-01-05 22:07:47 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://xbmc.org/;
|
|
|
|
description = "XBMC Media Center";
|
|
|
|
license = "GPLv2";
|
2013-03-11 18:12:46 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.iElectric ];
|
2013-01-05 22:07:47 +01:00
|
|
|
};
|
|
|
|
}
|