about summary refs log tree commit diff
path: root/pkgs/applications/video/kodi/plugins.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/video/kodi/plugins.nix')
-rw-r--r--pkgs/applications/video/kodi/plugins.nix36
1 files changed, 35 insertions, 1 deletions
diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index 41298269a184..8228c2c6cd92 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -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
+    '';
+  };
 }