diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libcec')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libcec/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libcec/default.nix b/nixpkgs/pkgs/development/libraries/libcec/default.nix index 039d3af37605..1d6fd44acb69 100644 --- a/nixpkgs/pkgs/development/libraries/libcec/default.nix +++ b/nixpkgs/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="; }; + # Fix dlopen path + postPatch = '' + substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so" + ''; + nativeBuildInputs = [ pkg-config cmake ]; buildInputs = [ udev libcec_platform ] ++ - lib.optional (libraspberrypi != null) libraspberrypi; + lib.optional withLibraspberrypi libraspberrypi; cmakeFlags = [ "-DBUILD_SHARED_LIBS=1" ]; - # Fix dlopen path - patchPhase = '' - substituteInPlace include/cecloader.h --replace "libcec.so" "$out/lib/libcec.so" - ''; - 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"; |