From 9d8a80404738a4bfb3ccb5ad337dbce6aebff1f2 Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Sun, 20 Jul 2014 10:39:42 +0200 Subject: [PATCH 1/3] added snes9x-gtk with pulseaudio support --- pkgs/misc/emulators/snes9x-gtk/default.nix | 30 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/misc/emulators/snes9x-gtk/default.nix diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix new file mode 100644 index 000000000000..e827a36a0871 --- /dev/null +++ b/pkgs/misc/emulators/snes9x-gtk/default.nix @@ -0,0 +1,30 @@ +{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa, intltool, gtk, pkgconfig, libxml2, x11, pulseaudio}: + +stdenv.mkDerivation { + name = "snes9x-gtk-1.53"; + + src = fetchurl { + url = http://files.ipherswipsite.com/snes9x/snes9x-1.53-src.tar.bz2; + sha256 = "9f7c5d2d0fa3fe753611cf94e8879b73b8bb3c0eab97cdbcb6ab7376efa78dc3"; + }; + + buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk pkgconfig libxml2 x11 pulseaudio]; + + preConfigure = '' + cd gtk + ''; + + configureFlags = "--prefix=$out/ --with-opengl"; + + installPhase = '' + mkdir -p $out/bin + cp snes9x-gtk $out/bin + ''; + + meta = { + description = "Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation; which includes some real gems that were only ever released in Japan."; + license = "LGPL"; + maintainers = [ stdenv.lib.maintainers.qknight ]; + homepage = http://www.snes9x.com/; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3ba6a64df2f..ffa8c74b89e5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11206,6 +11206,8 @@ let zsnes = callPackage_i686 ../misc/emulators/zsnes { }; + snes9x-gtk = callPackage ../misc/emulators/snes9x-gtk { }; + misc = import ../misc/misc.nix { inherit pkgs stdenv; }; bullet = callPackage ../development/libraries/bullet {}; From 743e3df3b85dbaf7a7e76ceeeec7d60e66f3b406 Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Wed, 23 Jul 2014 14:03:48 +0200 Subject: [PATCH 2/3] made changes requested by pSub --- pkgs/misc/emulators/snes9x-gtk/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix index e827a36a0871..e9805b277aab 100644 --- a/pkgs/misc/emulators/snes9x-gtk/default.nix +++ b/pkgs/misc/emulators/snes9x-gtk/default.nix @@ -10,9 +10,7 @@ stdenv.mkDerivation { buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk pkgconfig libxml2 x11 pulseaudio]; - preConfigure = '' - cd gtk - ''; + sourceRoot = "snes9x-1.53-src/gtk"; configureFlags = "--prefix=$out/ --with-opengl"; @@ -22,7 +20,8 @@ stdenv.mkDerivation { ''; meta = { - description = "Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation; which includes some real gems that were only ever released in Japan."; + description = "a portable, freeware Super Nintendo Entertainment System (SNES) emulator"; + longDescription = "Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation; which includes some real gems that were only ever released in Japan."; license = "LGPL"; maintainers = [ stdenv.lib.maintainers.qknight ]; homepage = http://www.snes9x.com/; From de1ae606dbf980894f476d23e1bec92ecc20f80d Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Sun, 27 Jul 2014 21:37:52 +0200 Subject: [PATCH 3/3] snes9x-gtk: added changes requested by offlinehacker --- pkgs/misc/emulators/snes9x-gtk/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix index e9805b277aab..760821e36543 100644 --- a/pkgs/misc/emulators/snes9x-gtk/default.nix +++ b/pkgs/misc/emulators/snes9x-gtk/default.nix @@ -1,16 +1,17 @@ {stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa, intltool, gtk, pkgconfig, libxml2, x11, pulseaudio}: -stdenv.mkDerivation { - name = "snes9x-gtk-1.53"; +stdenv.mkDerivation rec { + name = "snes9x-gtk-${version}"; + version = "1.53"; src = fetchurl { - url = http://files.ipherswipsite.com/snes9x/snes9x-1.53-src.tar.bz2; + url = "http://files.ipherswipsite.com/snes9x/snes9x-${version}-src.tar.bz2"; sha256 = "9f7c5d2d0fa3fe753611cf94e8879b73b8bb3c0eab97cdbcb6ab7376efa78dc3"; }; buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk pkgconfig libxml2 x11 pulseaudio]; - sourceRoot = "snes9x-1.53-src/gtk"; + sourceRoot = "snes9x-${version}-src/gtk"; configureFlags = "--prefix=$out/ --with-opengl"; @@ -22,7 +23,7 @@ stdenv.mkDerivation { meta = { description = "a portable, freeware Super Nintendo Entertainment System (SNES) emulator"; longDescription = "Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES) emulator. It basically allows you to play most games designed for the SNES and Super Famicom Nintendo game systems on your PC or Workstation; which includes some real gems that were only ever released in Japan."; - license = "LGPL"; + license = stdenv.lib.licenses.lgpl2; maintainers = [ stdenv.lib.maintainers.qknight ]; homepage = http://www.snes9x.com/; };