nixpkgs/pkgs/misc/emulators/nestopia/default.nix

73 lines
1.5 KiB
Nix
Raw Normal View History

2021-01-17 02:30:45 +00:00
{ lib, stdenv, fetchFromGitHub, pkg-config, SDL2, alsaLib, gtk3
2019-11-10 16:44:34 +00:00
, makeWrapper, libGLU, libGL, libarchive, libao, unzip, xdg_utils
2019-05-22 11:03:39 +00:00
, epoxy, gdk-pixbuf, gnome3, wrapGAppsHook
2017-09-03 12:22:39 +00:00
}:
2014-12-23 10:30:22 +00:00
stdenv.mkDerivation rec {
2017-09-03 12:22:39 +00:00
version = "1.47";
pname = "nestopia";
2017-09-03 12:22:39 +00:00
src = fetchFromGitHub {
owner = "rdanbrook";
repo = "nestopia";
2019-09-08 23:38:31 +00:00
rev = version;
2017-09-03 12:22:39 +00:00
sha256 = "0frr0gvjh5mxzdhj0ii3sh671slgnzlm8naqlc4h87rx4p4sz2y2";
2014-12-23 10:30:22 +00:00
};
# nondeterministic failures when creating directories
enableParallelBuilding = false;
2014-12-23 10:30:22 +00:00
hardeningDisable = [ "format" ];
2016-02-12 13:08:56 +00:00
2017-09-03 12:22:39 +00:00
buildInputs = [
SDL2
alsaLib
epoxy
gtk3
2019-05-22 11:03:39 +00:00
gdk-pixbuf
2019-11-10 16:44:34 +00:00
libGLU libGL
2017-09-03 12:22:39 +00:00
libarchive
libao
unzip
xdg_utils
2017-09-03 15:38:19 +00:00
gnome3.adwaita-icon-theme
];
nativeBuildInputs = [
2021-01-17 02:30:45 +00:00
pkg-config
2017-09-03 15:38:19 +00:00
makeWrapper
wrapGAppsHook
2017-09-03 12:22:39 +00:00
];
2014-12-23 10:30:22 +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
'';
2017-09-03 12:22:39 +00: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 10:30:22 +00:00
meta = {
homepage = "http://0ldsk00l.ca/nestopia/";
2014-12-23 10:30:22 +00:00
description = "NES emulator with a focus on accuracy";
2021-01-15 13:21:58 +00:00
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ MP2E ];
2014-12-23 10:30:22 +00:00
};
}