1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
{
lib,
SDL2,
alsa-lib,
boost,
callPackage,
cmake,
curl,
freeimage,
freetype,
libGL,
libGLU,
libvlc,
pkg-config,
rapidjson,
stdenv,
}:
let
sources = callPackage ./sources.nix { };
in
stdenv.mkDerivation {
inherit (sources.emulationstation) pname version src;
postUnpack = ''
pushd $sourceRoot/external/pugixml
cp --verbose --archive ${sources.pugixml.src}/* .
chmod --recursive 744 .
popd
'';
nativeBuildInputs = [
SDL2
cmake
pkg-config
];
buildInputs = [
SDL2
alsa-lib
boost
curl
freeimage
freetype
libGL
libGLU
libvlc
rapidjson
];
cmakeFlags = [ (lib.cmakeBool "GL" true) ];
strictDeps = true;
installPhase = ''
runHook preInstall
install -Dm755 ../emulationstation $out/bin/emulationstation
mkdir -p $out/share/emulationstation/
cp -r ../resources $out/share/emulationstation/
runHook postInstall
'';
# es-core/src/resources/ResourceManager.cpp: resources are searched at the
# same place of binaries.
postFixup = ''
pushd $out
ln -s $out/share/emulationstation/resources $out/bin/
popd
'';
passthru = {
inherit sources;
};
meta = {
homepage = "https://github.com/RetroPie/EmulationStation";
description = "Flexible emulator front-end supporting keyboardless navigation and custom system themes (forked by RetroPie)";
license = with lib.licenses; [ mit ];
mainProgram = "emulationstation";
maintainers = with lib.maintainers; [
AndersonTorres
edwtjo
];
platforms = lib.platforms.linux;
};
}
|