Merge pull request #4078 from edwtjo/libretro-cores-addendum

XBMC RetroArch integration and some cores
This commit is contained in:
Rickard Nilsson
2014-10-02 20:50:49 +02:00
6 changed files with 221 additions and 25 deletions
+4 -1
View File
@@ -24,7 +24,10 @@ let
--add-flags "-L $COREDIR/${d2u core}_libretro.so $@"
'';
passthru.libretroCore = "/lib/retroarch/cores";
passthru = {
core = core;
libretroCore = "/lib/retroarch/cores";
};
meta = with stdenv.lib; {
inherit description;
@@ -0,0 +1,39 @@
{ stdenv, pkgs, cores }:
assert cores != [];
with pkgs.lib;
let
script = exec: ''
#!${stdenv.shell}
nohup sh -c "sleep 1 && pkill -SIGSTOP xbmc" &
nohup sh -c "${exec} '$@' -f;pkill -SIGCONT xbmc"
'';
scriptSh = exec: pkgs.writeScript ("xbmc-"+exec.name) (script exec.path);
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
in
stdenv.mkDerivation rec {
name = "xbmc-retroarch-advanced-launchers-${version}";
version = "0.2";
dontBuild = true;
buildCommand = ''
mkdir -p $out/bin
${stdenv.lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/xbmc-${exec.name};") execs}
'';
meta = {
description = "XBMC retroarch advanced launchers";
longDescription = ''
These retroarch launchers are intended to be used with
anglescry advanced launcher for XBMC since device input is
caught by both XBMC and the retroarch process.
'';
license = "GPL-3";
};
}