libcec: enable build on darwin platform (#445550)

Changed files
+5 -3
pkgs
development
libraries
+3 -3
pkgs/development/libraries/libcec/default.nix
···
# Fix dlopen path
postPatch = ''
-
substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so"
+
substituteInPlace include/cecloader.h --replace "\"libcec." "\"$out/lib/libcec."
'';
nativeBuildInputs = [
···
cmake
];
buildInputs = [
-
udev
libcec_platform
]
+
++ lib.optional stdenv.hostPlatform.isLinux udev
++ lib.optional withLibraspberrypi libraspberrypi;
cmakeFlags = [
···
description = "Allows you (with the right hardware) to control your device with your TV remote control using existing HDMI cabling";
homepage = "http://libcec.pulse-eight.com";
license = lib.licenses.gpl2Plus;
-
platforms = platforms.linux;
+
platforms = platforms.linux ++ platforms.darwin;
teams = [ teams.kodi ];
};
}
+2
pkgs/development/libraries/libcec/platform.nix
···
nativeBuildInputs = [ cmake ];
+
cmakeFlags = lib.optional stdenv.hostPlatform.isDarwin "-DCMAKE_CXX_FLAGS='-std=c++11'";
+
meta = with lib; {
description = "Platform library for libcec and Kodi addons";
homepage = "https://github.com/Pulse-Eight/platform";