Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

54 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
udev,
libcec_platform,
withLibraspberrypi ? false,
libraspberrypi,
}:
stdenv.mkDerivation rec {
pname = "libcec";
version = "7.1.1";
src = fetchFromGitHub {
owner = "Pulse-Eight";
repo = "libcec";
rev = "libcec-${version}";
sha256 = "sha256-t8GUQKWTcxjyaAlsTP4C+heYiVYowG7x+fmjHPND7As=";
};
# Fix dlopen path
postPatch = ''
substituteInPlace include/cecloader.h --replace "\"libcec." "\"$out/lib/libcec."
'';
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
libcec_platform
]
++ lib.optional stdenv.hostPlatform.isLinux udev
++ lib.optional withLibraspberrypi libraspberrypi;
cmakeFlags = [
"-DBUILD_SHARED_LIBS=1"
]
++ lib.optionals stdenv.hostPlatform.isLinux [
"-DHAVE_LINUX_API=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";
license = lib.licenses.gpl2Plus;
platforms = platforms.linux ++ platforms.darwin;
teams = [ teams.kodi ];
};
}