2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkg-config, SDL2, alsaLib, gtk3
|
|
|
|
, makeWrapper, libGLU, libGL, libarchive, libao, unzip, xdg-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
, epoxy, gdk-pixbuf, gnome3, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "1.47";
|
|
|
|
pname = "nestopia";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rdanbrook";
|
|
|
|
repo = "nestopia";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "0frr0gvjh5mxzdhj0ii3sh671slgnzlm8naqlc4h87rx4p4sz2y2";
|
|
|
|
};
|
|
|
|
|
|
|
|
# nondeterministic failures when creating directories
|
|
|
|
enableParallelBuilding = false;
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
SDL2
|
|
|
|
alsaLib
|
|
|
|
epoxy
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
|
|
|
libGLU libGL
|
|
|
|
libarchive
|
|
|
|
libao
|
2021-02-05 17:12:51 +00:00
|
|
|
xdg-utils
|
2020-04-24 23:36:52 +00:00
|
|
|
gnome3.adwaita-icon-theme
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
makeWrapper
|
|
|
|
wrapGAppsHook
|
2021-03-19 17:17:44 +00:00
|
|
|
unzip
|
2020-04-24 23:36:52 +00: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
#(fetchpatch {
|
|
|
|
# url = "https://github.com/rdanbrook/nestopia/commit/f4bc74ac4954328b25e961e7afb7337377084079.patch";
|
|
|
|
# name = "gcc6.patch";
|
|
|
|
# sha256 = "1jy0c85xsfk9hrv5a6v0kk48d94864qb62yyni9fp93kyl33y2p4";
|
|
|
|
#})
|
|
|
|
./gcc6.patch
|
|
|
|
./build-fix.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "http://0ldsk00l.ca/nestopia/";
|
|
|
|
description = "NES emulator with a focus on accuracy";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ MP2E ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|