summary refs log tree commit diff
path: root/pkgs/misc/emulators/openmsx/default.nix
blob: 6ac6f93750e54fcce87fe6923277c1ff5554beab (plain) (blame)
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
{ stdenv, fetchFromGitHub, pkgconfig
, python
, alsaLib, glew, libGL, libpng
, libogg, libtheora, libvorbis
, SDL, SDL_image, SDL_ttf
, freetype, tcl, zlib
}:

stdenv.mkDerivation {

  pname = "openmsx";
  version = "git-2017-11-02";

  src = fetchFromGitHub {
    owner = "openMSX";
    repo = "openMSX";
    rev = "eeb74206ae347a3b17e9b99f91f2b4682c5db22c";
    sha256 = "170amj7k6wjhwx6psbplqljvckvhxxbv3aw72jrdxl1fb8zlnq3s";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ pkgconfig python ];

  buildInputs = [ alsaLib glew libGL libpng
    libogg libtheora libvorbis freetype
    SDL SDL_image SDL_ttf tcl zlib ];

  postPatch = ''
    cp ${./custom-nixos.mk} build/custom.mk
  '';

  dontAddPrefix = true;

  # Many thanks @mthuurne from OpenMSX project
  # for providing support to Nixpkgs :)
  TCL_CONFIG="${tcl}/lib/";

  meta = with stdenv.lib; {
    description = "A MSX emulator";
    longDescription = ''
      OpenMSX is an emulator for the MSX home computer system. Its goal is
      to emulate all aspects of the MSX with 100% accuracy.
    '';
    homepage = https://openmsx.org;
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.unix;
  };
}