From d54db47b3c204403119bea48893a16e0dc96477c Mon Sep 17 00:00:00 2001 From: Cray Elliott Date: Tue, 23 Dec 2014 02:30:22 -0800 Subject: add new emulator, nestopia undead --- pkgs/misc/emulators/nestopia/build-fix.patch | 18 +++++++++++++ pkgs/misc/emulators/nestopia/default.nix | 38 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 58 insertions(+) create mode 100644 pkgs/misc/emulators/nestopia/build-fix.patch create mode 100644 pkgs/misc/emulators/nestopia/default.nix diff --git a/pkgs/misc/emulators/nestopia/build-fix.patch b/pkgs/misc/emulators/nestopia/build-fix.patch new file mode 100644 index 000000000000..a7d82ead15ca --- /dev/null +++ b/pkgs/misc/emulators/nestopia/build-fix.patch @@ -0,0 +1,18 @@ +diff -wbBur rdanbrook-nestopia-f1dde9b/Makefile rdanbrook-nestopia-f1dde9b.my/Makefile +--- rdanbrook-nestopia-f1dde9b/Makefile 2013-01-20 20:10:25.000000000 +0400 ++++ rdanbrook-nestopia-f1dde9b.my/Makefile 2013-01-21 15:18:54.727577673 +0400 +@@ -197,11 +197,11 @@ + install -m 0644 NstDatabase.xml $(DATADIR) + install -m 0644 source/unix/icons/*.png $(DATADIR)/icons + install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons +- install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps +- xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop ++ install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps/nestopia.svg ++ install -Dm0644 $(DATADIR)/nestopia.desktop $(PREFIX)/share/applications/nestopia.desktop + + uninstall: +- xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop ++ rm $(PREFIX)/share/applications/nestopia.desktop + rm $(PREFIX)/share/pixmaps/nestopia.svg + rm $(BINDIR)/$(BIN) + rm -rf $(DATADIR) diff --git a/pkgs/misc/emulators/nestopia/default.nix b/pkgs/misc/emulators/nestopia/default.nix new file mode 100644 index 000000000000..f2aa1e06ec80 --- /dev/null +++ b/pkgs/misc/emulators/nestopia/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, pkgconfig, SDL2, alsaLib, gtk3, mesa_glu, makeWrapper +, mesa, libarchive, libao, unzip, xdg_utils, gsettings_desktop_schemas }: + +stdenv.mkDerivation rec { + name = "nestopia-1.46.2"; + src = fetchurl { + url = https://github.com/rdanbrook/nestopia/archive/1.46.2.tar.gz; + sha256 = "07h49xwvg61dx20rk5p4r3ax2ar5y0ppvm60cqwqljyi9rdfbh7p"; + }; + + enableParallelBuilding = true; + + buildInputs = [ pkgconfig SDL2 alsaLib gtk3 mesa_glu mesa makeWrapper + libarchive libao unzip xdg_utils gsettings_desktop_schemas ]; + + 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 = [ ./build-fix.patch ]; + + 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 ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 454398bed5cf..5efcb1812a78 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1840,6 +1840,8 @@ let ndjbdns = callPackage ../tools/networking/ndjbdns { }; + nestopia = callPackage ../misc/emulators/nestopia { }; + netatalk = callPackage ../tools/filesystems/netatalk { }; netcdf = callPackage ../development/libraries/netcdf { }; -- cgit 1.4.1