forked from mirrors/nixpkgs
xbmc: enable plugins to be picked up from the store.
This commit is contained in:
parent
9d93f9bcda
commit
9d4e344b46
|
@ -99,7 +99,7 @@ stdenv.mkDerivation rec {
|
|||
homepage = http://xbmc.org/;
|
||||
description = "Media center";
|
||||
license = "GPLv2";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.iElectric ];
|
||||
};
|
||||
}
|
||||
|
|
56
pkgs/applications/video/xbmc/plugins.nix
Normal file
56
pkgs/applications/video/xbmc/plugins.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{ stdenv, fetchFromGitHub, xbmc }:
|
||||
|
||||
let
|
||||
|
||||
pluginDir = "/lib/xbmc/plugin";
|
||||
|
||||
mkXBMCPlugin = { plugin, namespace, version, src, meta, ... }:
|
||||
stdenv.lib.makeOverridable stdenv.mkDerivation rec {
|
||||
inherit src meta;
|
||||
name = "xbmc-plugin-${plugin}-${version}";
|
||||
passthru = {
|
||||
xbmcPlugin = pluginDir;
|
||||
namespace = namespace;
|
||||
};
|
||||
dontStrip = true;
|
||||
installPhase = ''
|
||||
d=$out${pluginDir}/${namespace}
|
||||
mkdir -p $d
|
||||
cp -R $src/* $d
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
advanced-launcher = mkXBMCPlugin rec {
|
||||
|
||||
plugin = "advanced-launcher";
|
||||
namespace = "plugin.program.advanced.launcher";
|
||||
version = "2.5.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Angelscry";
|
||||
repo = namespace;
|
||||
rev = "f6f7980dc66d041e1635bb012d79aa8b3a8790ba";
|
||||
sha256 = "0wk41lpd6fw504q5x1h76hc99vw4jg4vq44bh7m21ism85ds0r47";
|
||||
};
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "http://forum.xbmc.org/showthread.php?tid=85724";
|
||||
description = "A program launcher for XBMC";
|
||||
longDescription = ''
|
||||
Advanced Launcher allows you to start any Linux, Windows and
|
||||
OS X external applications (with command line support or not)
|
||||
directly from the XBMC 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 ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
46
pkgs/applications/video/xbmc/wrapper.nix
Normal file
46
pkgs/applications/video/xbmc/wrapper.nix
Normal file
|
@ -0,0 +1,46 @@
|
|||
{ stdenv, lib, makeWrapper, xbmc, plugins }:
|
||||
|
||||
let
|
||||
|
||||
p = builtins.parseDrvName xbmc.name;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "xbmc-" + p.version;
|
||||
version = p.version;
|
||||
|
||||
buildInputs = [ makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p $out/share/xbmc/addons/packages
|
||||
${stdenv.lib.concatMapStrings
|
||||
(plugin: "ln -s ${plugin.out
|
||||
+ plugin.xbmcPlugin
|
||||
+ "/" + plugin.namespace
|
||||
} $out/share/xbmc/addons/.;") plugins}
|
||||
$(for plugin in ${xbmc}/share/xbmc/addons/*
|
||||
do
|
||||
$(ln -s $plugin/ $out/share/xbmc/addons/.)
|
||||
done)
|
||||
$(for share in ${xbmc}/share/xbmc/*
|
||||
do
|
||||
$(ln -s $share $out/share/xbmc/.)
|
||||
done)
|
||||
makeWrapper ${xbmc}/bin/xbmc $out/bin/xbmc \
|
||||
--prefix XBMC_HOME : $out/share/xbmc;
|
||||
'';
|
||||
|
||||
preferLocalBuilds = true;
|
||||
|
||||
meta = with xbmc.meta; {
|
||||
inherit license homepage;
|
||||
description = description
|
||||
+ " (with plugins: "
|
||||
+ lib.concatStrings (lib.intersperse ", " (map (x: ""+x.name) plugins))
|
||||
+ ")";
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -10549,7 +10549,19 @@ let
|
|||
import ../misc/emulators/retroarch/wrapper.nix {
|
||||
inherit stdenv lib makeWrapper retroarch;
|
||||
cores = retroArchCores;
|
||||
};
|
||||
};
|
||||
|
||||
wrapXBMC = { xbmc }:
|
||||
let
|
||||
cfg = stdenv.lib.attrByPath [ "xbmc" ] {} config;
|
||||
in
|
||||
import ../applications/video/xbmc/wrapper.nix {
|
||||
inherit stdenv lib makeWrapper xbmc;
|
||||
plugins = with xbmcPlugins;
|
||||
([]
|
||||
++ lib.optional (cfg.enableAdvancedLauncher or false) advanced-launcher
|
||||
);
|
||||
};
|
||||
|
||||
wxhexeditor = callPackage ../applications/editors/wxhexeditor { };
|
||||
|
||||
|
@ -10576,10 +10588,18 @@ let
|
|||
|
||||
xbindkeys = callPackage ../tools/X11/xbindkeys { };
|
||||
|
||||
xbmc = callPackage ../applications/video/xbmc {
|
||||
xbmcPlain = callPackage ../applications/video/xbmc {
|
||||
ffmpeg = ffmpeg_1;
|
||||
};
|
||||
|
||||
xbmcPlugins = recurseIntoAttrs (callPackage ../applications/video/xbmc/plugins.nix {
|
||||
xbmc = xbmcPlain;
|
||||
});
|
||||
|
||||
xbmc = wrapXBMC {
|
||||
xbmc = xbmcPlain;
|
||||
};
|
||||
|
||||
xbmc-retroarch-advanced-launchers =
|
||||
callPackage ../misc/emulators/retroarch/xbmc-advanced-launchers.nix {
|
||||
cores = retroArchCores;
|
||||
|
|
Loading…
Reference in a new issue