kodi-retroarch-advanced-launchers: move to pkgs/by-name, format with nixfmt-rfc-style

This commit is contained in:
Thiago Kenji Okada 2024-11-23 10:44:35 +00:00
parent 859926a5b5
commit b65ca14ede
2 changed files with 12 additions and 8 deletions

View File

@ -1,16 +1,23 @@
{ stdenv, pkgs, lib, runtimeShell, cores ? [ ] }:
{
stdenv,
pkgs,
lib,
runtimeShell,
cores ? [ ],
}:
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"
'';
scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
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 {

View File

@ -1478,9 +1478,6 @@ with pkgs;
libretro = recurseIntoAttrs (callPackage ../applications/emulators/retroarch/cores.nix { });
kodi-retroarch-advanced-launchers =
callPackage ../applications/emulators/retroarch/kodi-advanced-launchers.nix { };
# Aliases kept here because they are easier to use
x16-emulator = x16.emulator;
x16-rom = x16.rom;