about summary refs log tree commit diff
path: root/pkgs/by-name/ne/nestopia-ue/package.nix
blob: 78c15e6dfe8332411d17da1ae7ff238f5b342646 (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
76
77
78
{ lib
, SDL2
, alsa-lib
, autoconf-archive
, autoreconfHook
, fetchFromGitHub
, fltk
, libGL
, libGLU
, libao
, libarchive
, libepoxy
, makeWrapper
, pkg-config
, stdenv
, unzip
, wrapGAppsHook
, xdg-utils
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "nestopia";
  version = "1.52.1";

  src = fetchFromGitHub {
    owner = "0ldsk00l";
    repo = "nestopia";
    rev = finalAttrs.version;
    hash = "sha256-r8Z0Ejf5vWcdvxkUkUKJtipQIRoiwoRj0Bx06Gnxd08=";
  };

  buildInputs = [
    SDL2
    alsa-lib
    fltk
    libepoxy

    libGLU
    libGL
    libarchive
    libao
    xdg-utils
  ];

  nativeBuildInputs = [
    SDL2
    autoconf-archive
    autoreconfHook
    fltk
    pkg-config
    makeWrapper
    wrapGAppsHook
    unzip
  ];

  strictDeps = true;

  preInstall = ''
    mkdir -p $out/{bin,share/nestopia}
  '';

  preFixup = ''
     for f in $out/bin/*; do
       wrapProgram $f \
         --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
     done
  '';

  meta = {
    homepage = "http://0ldsk00l.ca/nestopia/";
    description = "Cross-platform Nestopia emulator core with a GUI";
    changelog = "https://raw.githubusercontent.com/0ldsk00l/nestopia/${finalAttrs.src.rev}/ChangeLog";
    license = lib.licenses.gpl2Plus;
    mainProgram = "nestopia";
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.linux;
  };
})