diff --git a/pkgs/development/libraries/libcec/default.nix b/pkgs/development/libraries/libcec/default.nix index 35644296a1d5..5688614ee207 100644 --- a/pkgs/development/libraries/libcec/default.nix +++ b/pkgs/development/libraries/libcec/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { # 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 = [ @@ -31,9 +31,9 @@ stdenv.mkDerivation rec { cmake ]; buildInputs = [ - udev libcec_platform ] + ++ lib.optional stdenv.hostPlatform.isLinux udev ++ lib.optional withLibraspberrypi libraspberrypi; cmakeFlags = [ @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { 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 ]; }; } diff --git a/pkgs/development/libraries/libcec/platform.nix b/pkgs/development/libraries/libcec/platform.nix index e5e05bde22ca..11139df5e027 100644 --- a/pkgs/development/libraries/libcec/platform.nix +++ b/pkgs/development/libraries/libcec/platform.nix @@ -18,6 +18,8 @@ stdenv.mkDerivation rec { 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";