1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Add Kodi retroarch launchers

This commit is contained in:
Edward Tjörnhammar 2015-01-19 22:14:37 +01:00
parent 5b1c9417a8
commit 3a321906d1
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,39 @@
{ stdenv, pkgs, cores }:
assert cores != [];
with pkgs.lib;
let
script = exec: ''
#!${stdenv.shell}
nohup sh -c "sleep 1 && pkill -SIGSTOP kodi" &
nohup sh -c "${exec} '$@' -f;pkill -SIGCONT kodi"
'';
scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
in
stdenv.mkDerivation rec {
name = "kodi-retroarch-advanced-launchers-${version}";
version = "0.2";
dontBuild = true;
buildCommand = ''
mkdir -p $out/bin
${stdenv.lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
'';
meta = {
description = "Kodi retroarch advanced launchers";
longDescription = ''
These retroarch launchers are intended to be used with
anglescry advanced launcher for Kodi since device input is
caught by both Kodi and the retroarch process.
'';
license = stdenv.lib.licenses.gpl3;
};
}

View file

@ -11591,6 +11591,11 @@ let
cores = retroArchCores;
};
kodi-retroarch-advanced-launchers =
callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix {
cores = retroArchCores;
};
xca = callPackage ../applications/misc/xca { };
xcalib = callPackage ../tools/X11/xcalib { };