summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorCarles Pagès <page@cubata.homelinux.net>2015-11-30 23:00:09 +0100
committerCarles Pagès <page@cubata.homelinux.net>2015-12-05 08:42:45 +0100
commit5d9148c9ad4779d23219c5f15576e439e8ae5b11 (patch)
treea8333a245fd2165e411d9e6d67bb5e5e3e05abd8 /pkgs
parent0a745f5dd20f3277c78a7deff875bc6954d2ed59 (diff)
downloadnixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar.gz
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar.bz2
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar.lz
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar.xz
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.tar.zst
nixpkgs-5d9148c9ad4779d23219c5f15576e439e8ae5b11.zip
kodiPlugins.pvr-hts: init at 2.1.18
Add Tvheadend HTSP PVR client addon for Kodi.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/video/kodi/plugins.nix51
-rw-r--r--pkgs/applications/video/kodi/wrapper.nix4
-rw-r--r--pkgs/top-level/all-packages.nix1
3 files changed, 52 insertions, 4 deletions
diff --git a/pkgs/applications/video/kodi/plugins.nix b/pkgs/applications/video/kodi/plugins.nix
index 07ad9d8526b..b02ab0eb8a9 100644
--- a/pkgs/applications/video/kodi/plugins.nix
+++ b/pkgs/applications/video/kodi/plugins.nix
@@ -1,8 +1,23 @@
-{ stdenv, fetchFromGitHub, kodi, steam }:
+{ stdenv, fetchFromGitHub, cmake, kodi, steam, libcec_platform, tinyxml }:
 
 let
 
-  pluginDir = "/lib/kodi/plugin";
+  pluginDir = "/share/kodi/addons";
+
+  kodi-platform = stdenv.mkDerivation rec {
+    project = "kodi-platform";
+    version = "15.2";
+    name = "${project}-${version}";
+
+    src = fetchFromGitHub {
+      owner = "xbmc";
+      repo = project;
+      rev = "45d6ad1984fdb1dc855076ff18484dbec33939d1";
+      sha256 = "1fai33mwyv5ab47b16i692g7a3vcnmxavx13xin2gh16y0qm62hi";
+    };
+
+    buildInputs = [ cmake kodi libcec_platform tinyxml ];
+  };
 
   mkKodiPlugin = { plugin, namespace, version, src, meta, ... }:
   stdenv.lib.makeOverridable stdenv.mkDerivation rec {
@@ -134,4 +149,36 @@ in
     propagatedBuildinputs = [ steam ];
   };
 
+  pvr-hts = (mkKodiPlugin rec {
+    plugin = "pvr-hts";
+    namespace = "pvr.hts";
+    version = "2.1.18";
+
+    src = fetchFromGitHub {
+      owner = "kodi-pvr";
+      repo = "pvr.hts";
+      rev = "016b0b3251d6d5bffaf68baf59010e4347759c4a";
+      sha256 = "03lhxipz03r516pycabqc9b89kd7wih3c2dr4p602bk64bsmpi0j";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = https://github.com/kodi-pvr/pvr.hts;
+      description = "Kodi's Tvheadend HTSP client addon";
+      platforms = platforms.all;
+      maintainers = with maintainers; [ page ];
+    };
+  }).override {
+    buildInputs = [ cmake 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/kodi/addons/pvr.hts/pvr.hts.so $out/share/kodi/addons/pvr.hts
+    '';
+  };
 }
diff --git a/pkgs/applications/video/kodi/wrapper.nix b/pkgs/applications/video/kodi/wrapper.nix
index 9f7a87f9987..716eef466fb 100644
--- a/pkgs/applications/video/kodi/wrapper.nix
+++ b/pkgs/applications/video/kodi/wrapper.nix
@@ -14,7 +14,7 @@ stdenv.mkDerivation {
   buildInputs = [ makeWrapper ];
 
   buildCommand = ''
-    mkdir -p $out/share/kodi/addons/packages
+    mkdir -p $out/share/kodi/addons
     ${stdenv.lib.concatMapStrings
         (plugin: "ln -s ${plugin.out
                             + plugin.kodiPlugin
@@ -50,4 +50,4 @@ stdenv.mkDerivation {
 
   };
 
-}
\ No newline at end of file
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index cef22a7ec39..fe50da49b0e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13568,6 +13568,7 @@ let
       ++ optional (config.kodi.enableGenesis or false) genesis
       ++ optional (config.kodi.enableSVTPlay or false) svtplay
       ++ optional (config.kodi.enableSteamLauncher or false) steam-launcher
+      ++ optional (config.kodi.enablePVRHTS or false) pvr-hts
       );
   };