git.iko.soy/typeable/nixpkgs
on master help sign in
add new emulator, nestopia undead
commitd54db47b3c204403119bea48893a16e0dc96477c authorCray Elliott <MP2E@archlinux.us> dateTue 23 Dec 2014, 02:30 (12 years ago) parentd2e6891
3 files changed+58
pkgs/misc/emulators/nestopia/build-fix.patch+18 pkgs/misc/emulators/nestopia/default.nix+38 pkgs/top-level/all-packages.nix+2
pkgs/misc/emulators/nestopia/build-fix.patchnew file+18
@@ -0,0 +1,18 @@
1+diff -wbBur rdanbrook-nestopia-f1dde9b/Makefile rdanbrook-nestopia-f1dde9b.my/Makefile
2+--- rdanbrook-nestopia-f1dde9b/Makefile 2013-01-20 20:10:25.000000000 +0400
3++++ rdanbrook-nestopia-f1dde9b.my/Makefile 2013-01-21 15:18:54.727577673 +0400
4+@@ -197,11 +197,11 @@
5+ install -m 0644 NstDatabase.xml $(DATADIR)
6+ install -m 0644 source/unix/icons/*.png $(DATADIR)/icons
7+ install -m 0644 source/unix/icons/*.svg $(DATADIR)/icons
8+- install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps
9+- xdg-desktop-menu install --novendor $(DATADIR)/nestopia.desktop
10++ install -m 0644 source/unix/icons/nestopia.svg $(PREFIX)/share/pixmaps/nestopia.svg
11++ install -Dm0644 $(DATADIR)/nestopia.desktop $(PREFIX)/share/applications/nestopia.desktop
12+
13+ uninstall:
14+- xdg-desktop-menu uninstall $(DATADIR)/nestopia.desktop
15++ rm $(PREFIX)/share/applications/nestopia.desktop
16+ rm $(PREFIX)/share/pixmaps/nestopia.svg
17+ rm $(BINDIR)/$(BIN)
18+ rm -rf $(DATADIR)
pkgs/misc/emulators/nestopia/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ stdenv, fetchurl, pkgconfig, SDL2, alsaLib, gtk3, mesa_glu, makeWrapper
2+, mesa, libarchive, libao, unzip, xdg_utils, gsettings_desktop_schemas }:
3+
4+stdenv.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+ enableParallelBuilding = true;
12+
13+ buildInputs = [ pkgconfig SDL2 alsaLib gtk3 mesa_glu mesa makeWrapper
14+ libarchive libao unzip xdg_utils gsettings_desktop_schemas ];
15+
16+ installPhase = ''
17+ mkdir -p $out/{bin,share/nestopia}
18+ make install PREFIX=$out
19+ '';
20+
21+ preFixup = ''
22+ for f in $out/bin/*; do
23+ wrapProgram $f \
24+ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
25+ done
26+ '';
27+
28+ patches = [ ./build-fix.patch ];
29+
30+ meta = {
31+ homepage = http://0ldsk00l.ca/nestopia/;
32+ description = "NES emulator with a focus on accuracy";
33+ license = stdenv.lib.licenses.gpl2;
34+ platforms = stdenv.lib.platforms.linux;
35+ maintainers = with stdenv.lib.maintainers; [ MP2E ];
36+ };
37+}
38+
pkgs/top-level/all-packages.nix+2
@@ -1840,6 +1840,8 @@ let
18401840
18411841 ndjbdns = callPackage ../tools/networking/ndjbdns { };
18421842
1843+ nestopia = callPackage ../misc/emulators/nestopia { };
1844+
18431845 netatalk = callPackage ../tools/filesystems/netatalk { };
18441846
18451847 netcdf = callPackage ../development/libraries/netcdf { };