1{ lib, stdenv, fetchFromGitHub, gtk3, rgbds, SDL2, wrapGAppsHook, glib }:
2
3stdenv.mkDerivation rec {
4 pname = "sameboy";
5 version = "0.14.6";
6
7 src = fetchFromGitHub {
8 owner = "LIJI32";
9 repo = "SameBoy";
10 rev = "v${version}";
11 sha256 = "sha256-KNAT36XLVtlFT3AKPTqP+GvgfOj0Y2SQ9PNVQv2HVwY=";
12 };
13
14 enableParallelBuilding = true;
15 # glib and wrapGAppsHook are needed to make the Open ROM menu work.
16 nativeBuildInputs = [ rgbds glib wrapGAppsHook ];
17 buildInputs = [ SDL2 ];
18
19 makeFlags = [
20 "CONF=release"
21 "FREEDESKTOP=true"
22 "PREFIX=$(out)"
23 ];
24
25 postPatch = ''
26 substituteInPlace OpenDialog/gtk.c \
27 --replace '"libgtk-3.so"' '"${gtk3}/lib/libgtk-3.so"'
28 '';
29
30 meta = with lib; {
31 homepage = "https://sameboy.github.io";
32 description = "Game Boy, Game Boy Color, and Super Game Boy emulator";
33
34 longDescription = ''
35 SameBoy is a user friendly Game Boy, Game Boy Color and Super
36 Game Boy emulator for macOS, Windows and Unix-like platforms.
37 SameBoy is extremely accurate and includes a wide range of
38 powerful debugging features, making it ideal for both casual
39 players and developers. In addition to accuracy and developer
40 capabilities, SameBoy has all the features one would expect from
41 an emulator – from save states to scaling filters.
42 '';
43
44 license = licenses.mit;
45 maintainers = with maintainers; [ NieDzejkob ];
46 platforms = platforms.linux;
47 };
48}