1{ lib
2, stdenv
3, fetchFromGitHub
4, pkg-config
5, SDL2
6, SDL2_image
7, SDL2_ttf
8, alsa-lib
9, freetype
10, glew
11, libGL
12, libogg
13, libpng
14, libtheora
15, libvorbis
16, python3
17, tcl
18, zlib
19}:
20
21stdenv.mkDerivation (finalAttrs: {
22 pname = "openmsx";
23 version = "18.0";
24
25 src = fetchFromGitHub {
26 owner = "openMSX";
27 repo = "openMSX";
28 rev = "RELEASE_${builtins.replaceStrings ["."] ["_"] finalAttrs.version}";
29 sha256 = "sha256-4V2B+OQbPVRmkRuqfeqyd+7pz9Z1YISjI79WqZS0Qhc=";
30 fetchSubmodules = true;
31 };
32
33 nativeBuildInputs = [
34 pkg-config
35 python3
36 ];
37
38 buildInputs = [
39 SDL2
40 SDL2_image
41 SDL2_ttf
42 alsa-lib
43 freetype
44 glew
45 libGL
46 libogg
47 libpng
48 libtheora
49 libvorbis
50 tcl
51 zlib
52 ];
53
54 postPatch = ''
55 cp ${./custom-nix.mk} build/custom.mk
56 '';
57
58 dontAddPrefix = true;
59
60 # Many thanks @mthuurne from OpenMSX project for providing support to
61 # Nixpkgs! :)
62 TCL_CONFIG="${tcl}/lib/";
63
64 meta = with lib; {
65 homepage = "https://openmsx.org";
66 description = "The MSX emulator that aims for perfection";
67 longDescription = ''
68 OpenMSX is an emulator for the MSX home computer system. Its goal is
69 to emulate all aspects of the MSX with 100% accuracy.
70 '';
71 license = with licenses; [ bsd2 boost gpl2Plus ];
72 maintainers = with maintainers; [ AndersonTorres ];
73 platforms = platforms.unix;
74 };
75})