tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Add Kodi retroarch launchers
Edward Tjörnhammar
11 years ago
3a321906
5b1c9417
+44
2 changed files
expand all
collapse all
unified
split
pkgs
misc
emulators
retroarch
kodi-advanced-launchers.nix
top-level
all-packages.nix
+39
pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix
···
1
1
+
{ stdenv, pkgs, cores }:
2
2
+
3
3
+
assert cores != [];
4
4
+
5
5
+
with pkgs.lib;
6
6
+
7
7
+
let
8
8
+
9
9
+
script = exec: ''
10
10
+
#!${stdenv.shell}
11
11
+
nohup sh -c "sleep 1 && pkill -SIGSTOP kodi" &
12
12
+
nohup sh -c "${exec} '$@' -f;pkill -SIGCONT kodi"
13
13
+
'';
14
14
+
scriptSh = exec: pkgs.writeScript ("kodi-"+exec.name) (script exec.path);
15
15
+
execs = map (core: rec { name = core.core; path = core+"/bin/retroarch-"+name;}) cores;
16
16
+
17
17
+
in
18
18
+
19
19
+
stdenv.mkDerivation rec {
20
20
+
name = "kodi-retroarch-advanced-launchers-${version}";
21
21
+
version = "0.2";
22
22
+
23
23
+
dontBuild = true;
24
24
+
25
25
+
buildCommand = ''
26
26
+
mkdir -p $out/bin
27
27
+
${stdenv.lib.concatMapStrings (exec: "ln -s ${scriptSh exec} $out/bin/kodi-${exec.name};") execs}
28
28
+
'';
29
29
+
30
30
+
meta = {
31
31
+
description = "Kodi retroarch advanced launchers";
32
32
+
longDescription = ''
33
33
+
These retroarch launchers are intended to be used with
34
34
+
anglescry advanced launcher for Kodi since device input is
35
35
+
caught by both Kodi and the retroarch process.
36
36
+
'';
37
37
+
license = stdenv.lib.licenses.gpl3;
38
38
+
};
39
39
+
}
+5
pkgs/top-level/all-packages.nix
···
11591
11591
cores = retroArchCores;
11592
11592
};
11593
11593
11594
11594
+
kodi-retroarch-advanced-launchers =
11595
11595
+
callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix {
11596
11596
+
cores = retroArchCores;
11597
11597
+
};
11598
11598
+
11594
11599
xca = callPackage ../applications/misc/xca { };
11595
11600
11596
11601
xcalib = callPackage ../tools/X11/xcalib { };