diff --git a/pkgs/development/libraries/libcec/default.nix b/pkgs/development/libraries/libcec/default.nix index 039d3af37605..1d6fd44acb69 100644 --- a/pkgs/development/libraries/libcec/default.nix +++ b/pkgs/development/libraries/libcec/default.nix @@ -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"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 44232de98245..a01619dbc242 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };