about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/emulators/openmsx/default.nix
blob: 9def450b0345bfefbda85caa7d5fce04966fc27c (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
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
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, SDL2
, SDL2_image
, SDL2_ttf
, alsa-lib
, freetype
, glew
, libGL
, libogg
, libpng
, libtheora
, libvorbis
, python3
, tcl
, zlib
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "openmsx";
  version = "19.0";

  src = fetchFromGitHub {
    owner = "openMSX";
    repo = "openMSX";
    rev = "RELEASE_${builtins.replaceStrings ["."] ["_"] finalAttrs.version}";
    sha256 = "sha256-NR0+vOUkbyuVWdHLmKEewDDmR1ibi3dtbSq+6RaxrGo=";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    pkg-config
    python3
  ];

  buildInputs = [
    SDL2
    SDL2_image
    SDL2_ttf
    alsa-lib
    freetype
    glew
    libGL
    libogg
    libpng
    libtheora
    libvorbis
    tcl
    zlib
  ];

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

  dontAddPrefix = true;

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

  meta = with lib; {
    homepage = "https://openmsx.org";
    description = "The MSX emulator that aims for perfection";
    longDescription = ''
      OpenMSX is an emulator for the MSX home computer system. Its goal is
      to emulate all aspects of the MSX with 100% accuracy.
    '';
    license = with licenses; [ bsd2 boost gpl2Plus ];
    maintainers = with maintainers; [ AndersonTorres ];
    platforms = platforms.unix;
  };
})