2017-09-03 14:22:39 +02:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, SDL2, alsaLib, gtk3, mesa_glu,
|
|
|
|
makeWrapper, mesa, libarchive, libao, unzip, xdg_utils, gsettings_desktop_schemas,
|
|
|
|
epoxy, gdk_pixbuf
|
|
|
|
}:
|
2014-12-23 11:30:22 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-09-03 14:22:39 +02:00
|
|
|
version = "1.47";
|
|
|
|
name = "nestopia-${version}";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rdanbrook";
|
|
|
|
repo = "nestopia";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "0frr0gvjh5mxzdhj0ii3sh671slgnzlm8naqlc4h87rx4p4sz2y2";
|
2014-12-23 11:30:22 +01:00
|
|
|
};
|
|
|
|
|
2015-03-07 14:33:38 +01:00
|
|
|
# nondeterministic failures when creating directories
|
|
|
|
enableParallelBuilding = false;
|
2014-12-23 11:30:22 +01:00
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" ];
|
2016-02-12 14:08:56 +01:00
|
|
|
|
2017-09-03 14:22:39 +02:00
|
|
|
buildInputs = [
|
|
|
|
pkgconfig
|
|
|
|
SDL2
|
|
|
|
alsaLib
|
|
|
|
epoxy
|
|
|
|
gtk3
|
|
|
|
gdk_pixbuf
|
|
|
|
mesa_glu
|
|
|
|
mesa
|
|
|
|
makeWrapper
|
|
|
|
libarchive
|
|
|
|
libao
|
|
|
|
unzip
|
|
|
|
xdg_utils
|
|
|
|
gsettings_desktop_schemas
|
|
|
|
];
|
2014-12-23 11:30:22 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/{bin,share/nestopia}
|
|
|
|
make install PREFIX=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
for f in $out/bin/*; do
|
|
|
|
wrapProgram $f \
|
|
|
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-09-03 14:22:39 +02:00
|
|
|
patches = [
|
|
|
|
#(fetchpatch {
|
|
|
|
# url = "https://github.com/rdanbrook/nestopia/commit/f4bc74ac4954328b25e961e7afb7337377084079.patch";
|
|
|
|
# name = "gcc6.patch";
|
|
|
|
# sha256 = "1jy0c85xsfk9hrv5a6v0kk48d94864qb62yyni9fp93kyl33y2p4";
|
|
|
|
#})
|
|
|
|
./gcc6.patch
|
|
|
|
./build-fix.patch
|
|
|
|
];
|
2014-12-23 11:30:22 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = http://0ldsk00l.ca/nestopia/;
|
|
|
|
description = "NES emulator with a focus on accuracy";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ MP2E ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|