libcec: remove ? null from inputs, use postPatch
This commit is contained in:
parent
4c2dca627e
commit
82d94d1aed
|
@ -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";
|
||||
|
|
|
@ -19463,9 +19463,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 { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue