2013-01-05 22:07:47 +01:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper
|
2013-12-11 21:12:40 +01:00
|
|
|
, pkgconfig, cmake, gnumake, yasm, pythonFull
|
2013-12-29 11:15:13 +01:00
|
|
|
, boost, avahi, libdvdcss, lame, autoreconfHook
|
|
|
|
, gettext, pcre, yajl, fribidi, which
|
2013-03-12 01:35:16 +01:00
|
|
|
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
|
2014-05-04 18:03:00 +02:00
|
|
|
, libX11, xproto, inputproto, libxml2
|
2013-01-05 22:07:47 +01:00
|
|
|
, libXt, libXmu, libXext, xextproto
|
|
|
|
, libXinerama, libXrandr, randrproto
|
2014-05-04 18:03:00 +02:00
|
|
|
, libXtst, libXfixes, fixesproto, systemd
|
2013-01-05 22:07:47 +01:00
|
|
|
, SDL, SDL_image, SDL_mixer, alsaLib
|
|
|
|
, mesa, glew, fontconfig, freetype, ftgl
|
|
|
|
, libjpeg, jasper, libpng, libtiff
|
|
|
|
, ffmpeg, libmpeg2, libsamplerate, libmad
|
2014-05-04 18:03:00 +02:00
|
|
|
, libogg, libvorbis, flac, libxslt
|
|
|
|
, lzo, libcdio, libmodplug, libass, libbluray
|
|
|
|
, sqlite, mysql, nasm, gnutls, libva
|
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
|
2013-09-29 21:17:26 +02:00
|
|
|
, libmicrohttpd
|
2013-01-05 22:07:47 +01:00
|
|
|
# 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
|
2014-05-04 18:03:00 +02:00
|
|
|
, pulseaudio ? null, pulseSupport ? true
|
2014-10-28 22:43:05 +01:00
|
|
|
, libcec ? null, cecSupport ? true
|
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;
|
2014-10-28 22:43:05 +01:00
|
|
|
assert cecSupport -> libcec != null;
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-08-24 18:19:58 +02:00
|
|
|
name = "xbmc-13.2";
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-08-24 18:19:58 +02:00
|
|
|
url = "https://github.com/xbmc/xbmc/archive/13.2-Gotham.tar.gz";
|
|
|
|
sha256 = "11g5a3h6kxz1vmnhagfjhg9nqf11wy0wzqqf4h338jh3lgzmvgxc";
|
2013-01-05 22:07:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2014-05-04 18:03:00 +02:00
|
|
|
makeWrapper libxml2 gnutls
|
2013-12-11 21:12:40 +01:00
|
|
|
pkgconfig cmake gnumake yasm pythonFull
|
2013-12-29 11:15:13 +01:00
|
|
|
boost libmicrohttpd autoreconfHook
|
2014-05-04 18:03:00 +02:00
|
|
|
gettext pcre yajl fribidi libva
|
2013-03-12 01:35:16 +01:00
|
|
|
openssl gperf tinyxml2 taglib libssh swig jre
|
2013-12-29 11:15:13 +01:00
|
|
|
libX11 xproto inputproto which
|
2013-01-05 22:07:47 +01: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
|
2014-05-04 18:03:00 +02:00
|
|
|
libogg libvorbis flac libxslt systemd
|
|
|
|
lzo libcdio libmodplug libass libbluray
|
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
|
2014-10-28 22:43:05 +01:00
|
|
|
++ lib.optional pulseSupport pulseaudio
|
|
|
|
++ lib.optional cecSupport libcec;
|
2013-01-05 22:07:47 +01:00
|
|
|
|
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2013-06-21 09:13:38 +02:00
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace xbmc/linux/LinuxTimezone.cpp \
|
|
|
|
--replace 'usr/share/zoneinfo' 'etc/zoneinfo'
|
2013-12-29 11:15:13 +01:00
|
|
|
./bootstrap
|
2013-06-21 09:13:38 +02:00
|
|
|
'';
|
|
|
|
|
2013-01-05 22:07:47 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--enable-external-libraries"
|
|
|
|
]
|
|
|
|
++ 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 \
|
2013-12-11 21:12:40 +01:00
|
|
|
--prefix PATH ":" "${pythonFull}/bin" \
|
2013-01-05 22:07:47 +01:00
|
|
|
--prefix PATH ":" "${glxinfo}/bin" \
|
|
|
|
--prefix PATH ":" "${xdpyinfo}/bin" \
|
2013-01-21 19:05:08 +01:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${curl}/lib" \
|
2014-05-04 18:03:00 +02:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${systemd}/lib" \
|
2014-09-13 16:40:44 +02:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${libmad}/lib" \
|
2014-10-28 22:43:05 +01:00
|
|
|
--prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib" \
|
|
|
|
--prefix LD_LIBRARY_PATH ":" "${libcec}/lib"
|
2013-01-05 22:07:47 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://xbmc.org/;
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "Media center";
|
2013-01-05 22:07:47 +01:00
|
|
|
license = "GPLv2";
|
2014-10-02 20:09:18 +02:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
2013-03-11 18:12:46 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.iElectric ];
|
2013-01-05 22:07:47 +01:00
|
|
|
};
|
|
|
|
}
|