Merge pull request #194101 from SuperSandro2000/libcec

This commit is contained in:
Sandro 2022-10-03 20:34:40 +02:00 committed by GitHub
commit 055cd58064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 11 deletions

View file

@ -1,4 +1,13 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, udev, libcec_platform, libraspberrypi ? null }:
{ lib
, stdenv
, fetchFromGitHub
, cmake
, pkg-config
, udev
, libcec_platform
, withLibraspberrypi ? false
, libraspberrypi
}:
stdenv.mkDerivation rec {
pname = "libcec";
@ -11,17 +20,17 @@ stdenv.mkDerivation rec {
sha256 = "sha256-OWqCn7Z0KG8sLlfMWd0btJIFJs79ET3Y1AV/y/Kj2TU=";
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ udev libcec_platform ] ++
lib.optional (libraspberrypi != null) libraspberrypi;
cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" ];
# Fix dlopen path
patchPhase = ''
postPatch = ''
substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so"
'';
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ udev libcec_platform ] ++
lib.optional withLibraspberrypi libraspberrypi;
cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" ];
meta = with lib; {
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";

View file

@ -19466,9 +19466,7 @@ with pkgs;
libccd = callPackage ../development/libraries/libccd { };
libcec = callPackage ../development/libraries/libcec {
libraspberrypi = null;
};
libcec = callPackage ../development/libraries/libcec { };
libcec_platform = callPackage ../development/libraries/libcec/platform.nix { };