@@ -0,0 +1,48 @@
1+{ stdenv, fetchFromGitHub, pkgconfig
2+, python
3+, alsaLib, glew, mesa_noglu, libpng
4+, libogg, libtheora, libvorbis
5+, SDL, SDL_image, SDL_ttf
6+, freetype, tcl, zlib
7+}:
8+
9+stdenv.mkDerivation rec {
10+
11+ name = "openmsx-${version}";
12+ version = "git-2017-11-02";
13+
14+ src = fetchFromGitHub {
15+ owner = "openMSX";
16+ repo = "openMSX";
17+ rev = "eeb74206ae347a3b17e9b99f91f2b4682c5db22c";
18+ sha256 = "170amj7k6wjhwx6psbplqljvckvhxxbv3aw72jrdxl1fb8zlnq3s";
19+ fetchSubmodules = true;
20+ };
21+
22+ nativeBuildInputs = [ pkgconfig python ];
23+
24+ buildInputs = [ alsaLib glew mesa_noglu libpng
25+ libogg libtheora libvorbis freetype
26+ SDL SDL_image SDL_ttf tcl zlib ];
27+
28+ postPatch = ''
29+ cp ${./custom-nixos.mk} build/custom.mk
30+ '';
31+
32+ dontAddPrefix = true;
33+
34+ # Many thanks @mthuurne from OpenMSX project
35+ # for providing support to Nixpkgs :)
36+ TCL_CONFIG="${tcl}/lib/";
37+
38+ meta = with stdenv.lib; {
39+ description = "A MSX emulator";
40+ longDescription = ''
41+ OpenMSX is an emulator for the MSX home computer system. Its goal is
42+ to emulate all aspects of the MSX with 100% accuracy.
43+ '';
44+ homepage = https://openmsx.org;
45+ maintainers = with maintainers; [ AndersonTorres ];
46+ platforms = platforms.unix;
47+ };
48+}