3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/emulators/retroarch/kodi-advanced-launchers.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, pkgs, lib, runtimeShell, cores ? [ ] }:
2015-01-19 21:14:37 +00:00
let
script = exec: ''
#!${runtimeShell}
nohup sh -c "pkill -SIGTSTP kodi" &
# https://forum.kodi.tv/showthread.php?tid=185074&pid=1622750#pid1622750
nohup sh -c "sleep 10 && ${exec} '$@' -f;pkill -SIGCONT kodi"
2015-01-19 21:14:37 +00:00
'';
scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
in
2019-08-13 22:52:01 +01:00
stdenv.mkDerivation {
pname = "kodi-retroarch-advanced-launchers";
2015-01-19 21:14:37 +00:00
version = "0.2";
dontBuild = true;
buildCommand = ''
mkdir -p $out/bin
2021-01-15 13:21:58 +00:00
${lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
2015-01-19 21:14:37 +00:00
'';
meta = {
description = "Kodi retroarch advanced launchers";
longDescription = ''
These retroarch launchers are intended to be used with
advanced (emulation) launcher for Kodi since device input is
otherwise caught by both Kodi and the retroarch process.
2015-01-19 21:14:37 +00:00
'';
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl3;
2015-01-19 21:14:37 +00:00
};
}