mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 12:23:02 +00:00
Migrating the XBMC plugin wrapper and plugins to Kodi.
This commit is contained in:
parent
14f6ea9d3c
commit
8d1657b463
108
pkgs/applications/video/kodi/plugins.nix
Normal file
108
pkgs/applications/video/kodi/plugins.nix
Normal file
@ -0,0 +1,108 @@
|
||||
{ stdenv, fetchFromGitHub, kodi }:
|
||||
|
||||
let
|
||||
|
||||
pluginDir = "/lib/kodi/plugin";
|
||||
|
||||
mkKodiPlugin = { plugin, namespace, version, src, meta, ... }:
|
||||
stdenv.lib.makeOverridable stdenv.mkDerivation rec {
|
||||
inherit src meta;
|
||||
name = "kodi-plugin-${plugin}-${version}";
|
||||
passthru = {
|
||||
kodiPlugin = pluginDir;
|
||||
namespace = namespace;
|
||||
};
|
||||
dontStrip = true;
|
||||
installPhase = ''
|
||||
d=$out${pluginDir}/${namespace}
|
||||
mkdir -p $d
|
||||
sauce="."
|
||||
[ -d ${namespace} ] && sauce=${namespace}
|
||||
cp -R $sauce/* $d
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
advanced-launcher = mkKodiPlugin rec {
|
||||
|
||||
plugin = "advanced-launcher";
|
||||
namespace = "plugin.program.advanced.launcher";
|
||||
version = "2.5.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Angelscry";
|
||||
repo = namespace;
|
||||
rev = "bb380b6e8b664246a791f553ddc856cbc60dae1f";
|
||||
sha256 = "0g4kk68zjl5rf6mll4g4cywq70s267471dp5r1qp3bpfpzkn0vf2";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://forum.kodi.tv/showthread.php?tid=85724";
|
||||
description = "A program launcher for Kodi";
|
||||
longDescription = ''
|
||||
Advanced Launcher allows you to start any Linux, Windows and
|
||||
OS X external applications (with command line support or not)
|
||||
directly from the Kodi GUI. Advanced Launcher also give you
|
||||
the possibility to edit, download (from Internet resources)
|
||||
and manage all the meta-data (informations and images) related
|
||||
to these applications.
|
||||
'';
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
genesis = mkKodiPlugin rec {
|
||||
|
||||
plugin = "genesis";
|
||||
namespace = "plugin.video.genesis";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lambda81";
|
||||
repo = "lambda-addons";
|
||||
rev = "1eb1632063e18f3f30e9fdbed2a15cf1e9c05315";
|
||||
sha256 = "1gzx0jq4gyhkpdd21a70lhww9djr5dlgyl93b4l7dhgr3hnzxccl";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://forums.tvaddons.ag/forums/148-lambda-s-kodi-addons";
|
||||
description = "The origins of streaming";
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
svtplay = mkKodiPlugin rec {
|
||||
|
||||
plugin = "svtplay";
|
||||
namespace = "plugin.video.svtplay";
|
||||
version = "4.0.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nilzen";
|
||||
repo = "xbmc-" + plugin;
|
||||
rev = "29a754e49584d1ca32f0c07b87304669cf266bb0";
|
||||
sha256 = "0k7mwaknw4h1jlq7ialbzgxxpb11j8bk29dx2gimp40lvnyw4yhz";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://forum.kodi.org/showthread.php?tid=67110";
|
||||
description = "Watch content from SVT Play";
|
||||
longDescription = ''
|
||||
With this addon you can stream content from SVT Play
|
||||
(svtplay.se). The plugin fetches the video URL from the SVT
|
||||
Play website and feeds it to the Kodi video player. HLS (m3u8)
|
||||
is the preferred video format by the plugin.
|
||||
'';
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ edwtjo ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
53
pkgs/applications/video/kodi/wrapper.nix
Normal file
53
pkgs/applications/video/kodi/wrapper.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ stdenv, lib, makeWrapper, kodi, plugins }:
|
||||
|
||||
let
|
||||
|
||||
p = builtins.parseDrvName kodi.name;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "kodi-" + p.version;
|
||||
version = p.version;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/kodi/addons/packages
|
||||
${stdenv.lib.concatMapStrings
|
||||
(plugin: "ln -s ${plugin.out
|
||||
+ plugin.kodiPlugin
|
||||
+ "/" + plugin.namespace
|
||||
} $out/share/kodi/addons/.;") plugins}
|
||||
$(for plugin in ${kodi}/share/kodi/addons/*
|
||||
do
|
||||
$(ln -s $plugin/ $out/share/kodi/addons/.)
|
||||
done)
|
||||
$(for share in ${kodi}/share/kodi/*
|
||||
do
|
||||
$(ln -s $share $out/share/kodi/.)
|
||||
done)
|
||||
$(for passthrough in icons xsessions applications
|
||||
do
|
||||
ln -s ${kodi}/share/$passthrough $out/share/
|
||||
done)
|
||||
$(for exe in kodi{,-standalone}
|
||||
do
|
||||
makeWrapper ${kodi}/bin/$exe $out/bin/$exe \
|
||||
--prefix KODI_HOME : $out/share/kodi;
|
||||
done)
|
||||
'';
|
||||
|
||||
preferLocalBuilds = true;
|
||||
|
||||
meta = with kodi.meta; {
|
||||
inherit license homepage;
|
||||
description = description
|
||||
+ " (with plugins: "
|
||||
+ lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins))
|
||||
+ ")";
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -11529,6 +11529,16 @@ let
|
||||
);
|
||||
};
|
||||
|
||||
wrapKodi = { kodi }: import ../applications/video/kodi/wrapper.nix {
|
||||
inherit stdenv lib makeWrapper kodi;
|
||||
plugins = let inherit (lib) optional; in with kodiPlugins;
|
||||
([]
|
||||
++ optional (config.kodi.enableAdvancedLauncher or false) advanced-launcher
|
||||
++ optional (config.kodi.enableGenesis or false) genesis
|
||||
++ optional (config.kodi.enableSVTPlay or false) svtplay
|
||||
);
|
||||
};
|
||||
|
||||
wxhexeditor = callPackage ../applications/editors/wxhexeditor { };
|
||||
|
||||
wxcam = callPackage ../applications/video/wxcam {
|
||||
@ -11566,12 +11576,20 @@ let
|
||||
xbmc = xbmcPlain;
|
||||
};
|
||||
|
||||
kodi = callPackage ../applications/video/kodi { };
|
||||
kodiPlain = callPackage ../applications/video/kodi { };
|
||||
|
||||
kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix {
|
||||
kodi = kodiPlain;
|
||||
});
|
||||
|
||||
kodi = wrapKodi {
|
||||
kodi = kodiPlain;
|
||||
};
|
||||
|
||||
xbmc-retroarch-advanced-launchers =
|
||||
callPackage ../misc/emulators/retroarch/xbmc-advanced-launchers.nix {
|
||||
cores = retroArchCores;
|
||||
};
|
||||
};
|
||||
|
||||
xca = callPackage ../applications/misc/xca { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user