Merge pull request #25366 from titanous/kodi-hdhomerun

kodi: add pvr-hdhomerun plugin
This commit is contained in:
Carles Pagès 2017-05-22 23:32:07 +02:00 committed by GitHub
commit f60767d55e
3 changed files with 72 additions and 1 deletions

View File

@ -1,5 +1,6 @@
{ stdenv, fetchurl, fetchFromGitHub, fetchpatch, lib
, unzip, cmake, kodi, steam, libcec_platform, tinyxml }:
, unzip, cmake, kodi, steam, libcec_platform, tinyxml
, jsoncpp, libhdhomerun }:
let
@ -265,4 +266,37 @@ in
ln -s $out/lib/addons/pvr.hts/pvr.hts.so* $out/share/kodi/addons/pvr.hts
'';
};
pvr-hdhomerun = (mkKodiPlugin rec {
plugin = "pvr-hdhomerun";
namespace = "pvr.hdhomerun";
version = "2.4.7";
src = fetchFromGitHub {
owner = "kodi-pvr";
repo = "pvr.hdhomerun";
rev = "60d89d16dd953d38947e8a6da2f8bb84a0f764ef";
sha256 = "0dvdv0vk2q12nj0i5h51iaypy3i7jfsxjyxwwpxfy82y8260ragy";
};
meta = with stdenv.lib; {
homepage = https://github.com/kodi-pvr/pvr.hdhomerun;
description = "Kodi's HDHomeRun PVR client addon";
platforms = platforms.all;
maintainers = with maintainers; [ titanous ];
};
}).override {
buildInputs = [ cmake jsoncpp libhdhomerun kodi libcec_platform kodi-platform ];
# disables check ensuring install prefix is that of kodi
cmakeFlags = [ "-DOVERRIDE_PATHS=1" ];
# kodi checks for plugin .so libs existance in the addon folder (share/...)
# and the non-wrapped kodi lib/... folder before even trying to dlopen
# them. Symlinking .so, as setting LD_LIBRARY_PATH is of no use
installPhase = ''
make install
ln -s $out/lib/addons/pvr.hdhomerun/pvr.hdhomerun.so* $out/share/kodi/addons/pvr.hdhomerun
'';
};
}

View File

@ -0,0 +1,34 @@
{ stdenv, fetchgit }:
stdenv.mkDerivation {
name = "libhdhomerun-1efbcb";
src = fetchgit {
url = "git://github.com/Silicondust/libhdhomerun.git";
rev = "1efbcb2b87b17a82f2b3d873d1c9cc1c6a3a9b77";
sha256 = "11iyrfs98xb50n9iqnwfphmmnn5w3mq2l9cjjpf8qp29cvs33cgy";
};
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace Makefile --replace "gcc" "cc"
substituteInPlace Makefile --replace "-arch i386" ""
'';
installPhase = let
libSuff = if stdenv.isDarwin then "dylib" else "so";
in ''
mkdir -p $out/{bin,lib,include/hdhomerun}
install -Dm444 libhdhomerun.${libSuff} $out/lib
install -Dm555 hdhomerun_config $out/bin
cp *.h $out/include/hdhomerun
'';
meta = with stdenv.lib; {
description = "Implements the libhdhomerun protocol for use with Silicondust HDHomeRun TV tuners";
homepage = "https://github.com/Silicondust/libhdhomerun";
repositories.git = "https://github.com/Silicondust/libhdhomerun.git";
license = stdenv.lib.licenses.lgpl2;
platforms = stdenv.lib.platforms.unix;
maintainers = [ maintainers.titanous ];
};
}

View File

@ -8615,6 +8615,8 @@ with pkgs;
libharu = callPackage ../development/libraries/libharu { };
libhdhomerun = callPackage ../development/libraries/libhdhomerun { };
libhttpseverywhere = callPackage ../development/libraries/libhttpseverywhere { };
libHX = callPackage ../development/libraries/libHX { };
@ -16440,6 +16442,7 @@ with pkgs;
++ optional (config.kodi.enableSVTPlay or false) svtplay
++ optional (config.kodi.enableSteamLauncher or false) steam-launcher
++ optional (config.kodi.enablePVRHTS or false) pvr-hts
++ optional (config.kodi.enablePVRHDHomeRun or false) pvr-hdhomerun
);
};