diff --git a/pkgs/applications/video/kodi/default.nix b/pkgs/applications/video/kodi/default.nix index 30eac05c234..09b33099139 100644 --- a/pkgs/applications/video/kodi/default.nix +++ b/pkgs/applications/video/kodi/default.nix @@ -15,6 +15,7 @@ , lzo, libcdio, libmodplug, libass, libbluray , sqlite, mysql, nasm, gnutls, libva, wayland , curl, bzip2, zip, unzip, glxinfo, xdpyinfo +, libcec, libcec_platform , dbus_libs ? null, dbusSupport ? true , udev, udevSupport ? true , libusb ? null, usbSupport ? false @@ -24,7 +25,6 @@ , rtmpdump ? null, rtmpSupport ? true , libvdpau ? null, vdpauSupport ? true , libpulseaudio ? null, pulseSupport ? true -, libcec ? null, cecSupport ? true }: assert dbusSupport -> dbus_libs != null; @@ -33,7 +33,6 @@ assert usbSupport -> libusb != null && ! udevSupport; # libusb won't be used i assert sambaSupport -> samba != null; assert vdpauSupport -> libvdpau != null; assert pulseSupport -> libpulseaudio != null; -assert cecSupport -> libcec != null; assert rtmpSupport -> rtmpdump != null; let @@ -69,6 +68,7 @@ in stdenv.mkDerivation rec { lzo libcdio libmodplug libass libbluray sqlite mysql.lib nasm avahi libdvdcss lame curl bzip2 zip unzip glxinfo xdpyinfo + libcec libcec_platform ] ++ lib.optional dbusSupport dbus_libs ++ lib.optional udevSupport udev @@ -76,7 +76,6 @@ in stdenv.mkDerivation rec { ++ lib.optional sambaSupport samba ++ lib.optional vdpauSupport libvdpau ++ lib.optional pulseSupport libpulseaudio - ++ lib.optional cecSupport libcec ++ lib.optional rtmpSupport rtmpdump; dontUseCmakeConfigure = true; @@ -93,9 +92,7 @@ in stdenv.mkDerivation rec { ./bootstrap ''; - configureFlags = [ - "--enable-external-libraries" - ] + configureFlags = [ ] ++ lib.optional (!sambaSupport) "--disable-samba" ++ lib.optional vdpauSupport "--enable-vdpau" ++ lib.optional pulseSupport "--enable-pulse" @@ -112,6 +109,7 @@ in stdenv.mkDerivation rec { --prefix LD_LIBRARY_PATH ":" "${libmad}/lib" \ --prefix LD_LIBRARY_PATH ":" "${libvdpau}/lib" \ --prefix LD_LIBRARY_PATH ":" "${libcec}/lib" \ + --prefix LD_LIBRARY_PATH ":" "${libcec_platform}/lib" \ --prefix LD_LIBRARY_PATH ":" "${rtmpdump}/lib" done ''; diff --git a/pkgs/development/libraries/libcec/default.nix b/pkgs/development/libraries/libcec/default.nix index 6eca14767c5..94b483e1f5d 100644 --- a/pkgs/development/libraries/libcec/default.nix +++ b/pkgs/development/libraries/libcec/default.nix @@ -1,16 +1,18 @@ -{ stdenv, fetchurl, autoreconfHook, pkgconfig, udev }: +{ stdenv, fetchurl, cmake, pkgconfig, udev, libcec_platform }: -let version = "2.2.0"; in +let version = "3.0.1"; in stdenv.mkDerivation { name = "libcec-${version}"; src = fetchurl { - url = "https://github.com/Pulse-Eight/libcec/archive/libcec-${version}-repack.tar.gz"; - sha256 = "1kdfak8y96v14d5vp2apkjjs0fvvim9phc0nkhlq5pjlagk8v32x"; + url = "https://github.com/Pulse-Eight/libcec/archive/libcec-${version}.tar.gz"; + sha256 = "0gi5gq8pz6vfdx80pimx23d5g243zzgmc7s8wpb686csjk470dky"; }; - buildInputs = [ autoreconfHook pkgconfig udev ]; + buildInputs = [ cmake pkgconfig udev libcec_platform ]; + + cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" ]; # Fix dlopen path patchPhase = '' diff --git a/pkgs/development/libraries/libcec/platform.nix b/pkgs/development/libraries/libcec/platform.nix new file mode 100644 index 00000000000..6db2656c9f4 --- /dev/null +++ b/pkgs/development/libraries/libcec/platform.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, cmake }: + +let version = "1.0.10"; in + +stdenv.mkDerivation { + name = "libcec-${version}"; + + src = fetchurl { + url = "https://github.com/Pulse-Eight/platform/archive/${version}.tar.gz"; + sha256 = "1kdmi9b62nky4jrb5519ddnw5n7s7m6qyj7rzhg399f0n6f278vb"; + }; + + nativeBuildInputs = [ cmake ]; + + meta = with stdenv.lib; { + description = "Platform library for libcec and Kodi addons"; + homepage = "https://github.com/Pulse-Eight/platform"; + repositories.git = "https://github.com/Pulse-Eight/libcec.git"; + license = stdenv.lib.licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.titanous ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 11c8676a10c..6f1df268d50 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6769,6 +6769,7 @@ let else libcanberra; libcec = callPackage ../development/libraries/libcec { }; + libcec_platform = callPackage ../development/libraries/libcec/platform.nix { }; libcello = callPackage ../development/libraries/libcello {};