lol
1{ stdenv, fetchurl, pkgconfig, SDL2, alsaLib, gtk3, mesa_glu, makeWrapper
2, mesa, libarchive, libao, unzip, xdg_utils, gsettings_desktop_schemas }:
3
4stdenv.mkDerivation rec {
5 name = "nestopia-1.46.2";
6 src = fetchurl {
7 url = https://github.com/rdanbrook/nestopia/archive/1.46.2.tar.gz;
8 sha256 = "07h49xwvg61dx20rk5p4r3ax2ar5y0ppvm60cqwqljyi9rdfbh7p";
9 };
10
11 # nondeterministic failures when creating directories
12 enableParallelBuilding = false;
13
14 hardeningDisable = [ "format" ];
15
16 buildInputs = [ pkgconfig SDL2 alsaLib gtk3 mesa_glu mesa makeWrapper
17 libarchive libao unzip xdg_utils gsettings_desktop_schemas ];
18
19 installPhase = ''
20 mkdir -p $out/{bin,share/nestopia}
21 make install PREFIX=$out
22 '';
23
24 preFixup = ''
25 for f in $out/bin/*; do
26 wrapProgram $f \
27 --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
28 done
29 '';
30
31 patches = [ ./build-fix.patch ];
32
33 meta = {
34 homepage = http://0ldsk00l.ca/nestopia/;
35 description = "NES emulator with a focus on accuracy";
36 license = stdenv.lib.licenses.gpl2;
37 platforms = stdenv.lib.platforms.linux;
38 maintainers = with stdenv.lib.maintainers; [ MP2E ];
39 };
40}
41