lol

Migrating the XBMC plugin wrapper and plugins to Kodi.

+181 -2
+108
pkgs/applications/video/kodi/plugins.nix
··· 1 + { stdenv, fetchFromGitHub, kodi }: 2 + 3 + let 4 + 5 + pluginDir = "/lib/kodi/plugin"; 6 + 7 + mkKodiPlugin = { plugin, namespace, version, src, meta, ... }: 8 + stdenv.lib.makeOverridable stdenv.mkDerivation rec { 9 + inherit src meta; 10 + name = "kodi-plugin-${plugin}-${version}"; 11 + passthru = { 12 + kodiPlugin = pluginDir; 13 + namespace = namespace; 14 + }; 15 + dontStrip = true; 16 + installPhase = '' 17 + d=$out${pluginDir}/${namespace} 18 + mkdir -p $d 19 + sauce="." 20 + [ -d ${namespace} ] && sauce=${namespace} 21 + cp -R $sauce/* $d 22 + ''; 23 + }; 24 + 25 + in 26 + { 27 + 28 + advanced-launcher = mkKodiPlugin rec { 29 + 30 + plugin = "advanced-launcher"; 31 + namespace = "plugin.program.advanced.launcher"; 32 + version = "2.5.8"; 33 + 34 + src = fetchFromGitHub { 35 + owner = "Angelscry"; 36 + repo = namespace; 37 + rev = "bb380b6e8b664246a791f553ddc856cbc60dae1f"; 38 + sha256 = "0g4kk68zjl5rf6mll4g4cywq70s267471dp5r1qp3bpfpzkn0vf2"; 39 + }; 40 + 41 + meta = with stdenv.lib; { 42 + homepage = "http://forum.kodi.tv/showthread.php?tid=85724"; 43 + description = "A program launcher for Kodi"; 44 + longDescription = '' 45 + Advanced Launcher allows you to start any Linux, Windows and 46 + OS X external applications (with command line support or not) 47 + directly from the Kodi GUI. Advanced Launcher also give you 48 + the possibility to edit, download (from Internet resources) 49 + and manage all the meta-data (informations and images) related 50 + to these applications. 51 + ''; 52 + platforms = platforms.all; 53 + maintainers = with maintainers; [ edwtjo ]; 54 + }; 55 + 56 + }; 57 + 58 + genesis = mkKodiPlugin rec { 59 + 60 + plugin = "genesis"; 61 + namespace = "plugin.video.genesis"; 62 + version = "2.4.1"; 63 + 64 + src = fetchFromGitHub { 65 + owner = "lambda81"; 66 + repo = "lambda-addons"; 67 + rev = "1eb1632063e18f3f30e9fdbed2a15cf1e9c05315"; 68 + sha256 = "1gzx0jq4gyhkpdd21a70lhww9djr5dlgyl93b4l7dhgr3hnzxccl"; 69 + }; 70 + 71 + meta = with stdenv.lib; { 72 + homepage = "http://forums.tvaddons.ag/forums/148-lambda-s-kodi-addons"; 73 + description = "The origins of streaming"; 74 + platforms = platforms.all; 75 + maintainers = with maintainers; [ edwtjo ]; 76 + }; 77 + 78 + }; 79 + 80 + svtplay = mkKodiPlugin rec { 81 + 82 + plugin = "svtplay"; 83 + namespace = "plugin.video.svtplay"; 84 + version = "4.0.9"; 85 + 86 + src = fetchFromGitHub { 87 + owner = "nilzen"; 88 + repo = "xbmc-" + plugin; 89 + rev = "29a754e49584d1ca32f0c07b87304669cf266bb0"; 90 + sha256 = "0k7mwaknw4h1jlq7ialbzgxxpb11j8bk29dx2gimp40lvnyw4yhz"; 91 + }; 92 + 93 + meta = with stdenv.lib; { 94 + homepage = "http://forum.kodi.org/showthread.php?tid=67110"; 95 + description = "Watch content from SVT Play"; 96 + longDescription = '' 97 + With this addon you can stream content from SVT Play 98 + (svtplay.se). The plugin fetches the video URL from the SVT 99 + Play website and feeds it to the Kodi video player. HLS (m3u8) 100 + is the preferred video format by the plugin. 101 + ''; 102 + platforms = platforms.all; 103 + maintainers = with maintainers; [ edwtjo ]; 104 + }; 105 + 106 + }; 107 + 108 + }
+53
pkgs/applications/video/kodi/wrapper.nix
··· 1 + { stdenv, lib, makeWrapper, kodi, plugins }: 2 + 3 + let 4 + 5 + p = builtins.parseDrvName kodi.name; 6 + 7 + in 8 + 9 + stdenv.mkDerivation { 10 + 11 + name = "kodi-" + p.version; 12 + version = p.version; 13 + 14 + buildInputs = [ makeWrapper ]; 15 + 16 + buildCommand = '' 17 + mkdir -p $out/share/kodi/addons/packages 18 + ${stdenv.lib.concatMapStrings 19 + (plugin: "ln -s ${plugin.out 20 + + plugin.kodiPlugin 21 + + "/" + plugin.namespace 22 + } $out/share/kodi/addons/.;") plugins} 23 + $(for plugin in ${kodi}/share/kodi/addons/* 24 + do 25 + $(ln -s $plugin/ $out/share/kodi/addons/.) 26 + done) 27 + $(for share in ${kodi}/share/kodi/* 28 + do 29 + $(ln -s $share $out/share/kodi/.) 30 + done) 31 + $(for passthrough in icons xsessions applications 32 + do 33 + ln -s ${kodi}/share/$passthrough $out/share/ 34 + done) 35 + $(for exe in kodi{,-standalone} 36 + do 37 + makeWrapper ${kodi}/bin/$exe $out/bin/$exe \ 38 + --prefix KODI_HOME : $out/share/kodi; 39 + done) 40 + ''; 41 + 42 + preferLocalBuilds = true; 43 + 44 + meta = with kodi.meta; { 45 + inherit license homepage; 46 + description = description 47 + + " (with plugins: " 48 + + lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins)) 49 + + ")"; 50 + 51 + }; 52 + 53 + }
+20 -2
pkgs/top-level/all-packages.nix
··· 11529 11529 ); 11530 11530 }; 11531 11531 11532 + wrapKodi = { kodi }: import ../applications/video/kodi/wrapper.nix { 11533 + inherit stdenv lib makeWrapper kodi; 11534 + plugins = let inherit (lib) optional; in with kodiPlugins; 11535 + ([] 11536 + ++ optional (config.kodi.enableAdvancedLauncher or false) advanced-launcher 11537 + ++ optional (config.kodi.enableGenesis or false) genesis 11538 + ++ optional (config.kodi.enableSVTPlay or false) svtplay 11539 + ); 11540 + }; 11541 + 11532 11542 wxhexeditor = callPackage ../applications/editors/wxhexeditor { }; 11533 11543 11534 11544 wxcam = callPackage ../applications/video/wxcam { ··· 11566 11576 xbmc = xbmcPlain; 11567 11577 }; 11568 11578 11569 - kodi = callPackage ../applications/video/kodi { }; 11579 + kodiPlain = callPackage ../applications/video/kodi { }; 11580 + 11581 + kodiPlugins = recurseIntoAttrs (callPackage ../applications/video/kodi/plugins.nix { 11582 + kodi = kodiPlain; 11583 + }); 11584 + 11585 + kodi = wrapKodi { 11586 + kodi = kodiPlain; 11587 + }; 11570 11588 11571 11589 xbmc-retroarch-advanced-launchers = 11572 11590 callPackage ../misc/emulators/retroarch/xbmc-advanced-launchers.nix { 11573 11591 cores = retroArchCores; 11574 - }; 11592 + }; 11575 11593 11576 11594 xca = callPackage ../applications/misc/xca { }; 11577 11595