summary refs log tree commit diff
path: root/pkgs/misc/emulators
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r--pkgs/misc/emulators/darcnes/default.nix28
-rw-r--r--pkgs/misc/emulators/epsxe/default.nix55
-rw-r--r--pkgs/misc/emulators/fakenes/default.nix5
-rw-r--r--pkgs/misc/emulators/mednaffe/default.nix32
-rw-r--r--pkgs/misc/emulators/ppsspp/default.nix52
-rw-r--r--pkgs/misc/emulators/snes9x-gtk/default.nix36
6 files changed, 134 insertions, 74 deletions
diff --git a/pkgs/misc/emulators/darcnes/default.nix b/pkgs/misc/emulators/darcnes/default.nix
index 12c76c89790a..70e7351e295c 100644
--- a/pkgs/misc/emulators/darcnes/default.nix
+++ b/pkgs/misc/emulators/darcnes/default.nix
@@ -1,28 +1,24 @@
-{stdenv, fetchurl, libX11, libXt, libXext, libXaw }:
+{ stdenv, fetchurl, libX11, libXt, libXext, libXaw }:
 
-assert stdenv.system == "i686-linux";
+stdenv.mkDerivation rec {
+  name = "darcnes-${version}";
+  version = "9b0401";
 
-stdenv.mkDerivation {
-  name = "darcnes-9b0401";
   src = fetchurl {
-    url = http://www.dridus.com/~nyef/darcnes/download/dn9b0401.tgz;
+    url = "https://web.archive.org/web/20130511081532/http://www.dridus.com/~nyef/darcnes/download/dn${version}.tgz";
     sha256 = "05a7mh51rg7ydb414m3p5mm05p4nz2bgvspqzwm3bhbj7zz543k3";
   };
 
-  buildInputs = [ libX11 libXt libXext libXaw ];
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp darcnes $out/bin
-  '';
-
   patches = [ ./label.patch ];
 
+  buildInputs = [ libX11 libXt libXext libXaw ];
+  installPhase = "install -Dt $out/bin darcnes";
+
   meta = {
-    homepage = http://www.dridus.com/~nyef/darcnes/;
-    description = "Multi-System emulator, specially for NES";
-    /* Prohibited commercial use, credit required. */
+    homepage = https://web.archive.org/web/20130502171725/http://www.dridus.com/~nyef/darcnes/;
+    description = "Sega Master System, Game Gear, SG-1000, NES, ColecoVision and Apple II emulator";
+    # Prohibited commercial use, credit required.
     license = stdenv.lib.licenses.free;
+    platforms = [ "i686-linux" ];
   };
-
 }
diff --git a/pkgs/misc/emulators/epsxe/default.nix b/pkgs/misc/emulators/epsxe/default.nix
new file mode 100644
index 000000000000..e367d6a14984
--- /dev/null
+++ b/pkgs/misc/emulators/epsxe/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchurl, alsaLib, curl, gdk_pixbuf, gcc, glib, gtk3,
+  libX11, openssl, ncurses5, SDL, SDL_ttf, unzip, zlib, wrapGAppsHook }:
+
+with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  name = "epsxe-${version}";
+  version = "2.0.5";
+
+  src = with stdenv.lib; let
+    version2 = concatStrings (splitString "." version);
+    platform = "linux" + (optionalString stdenv.is64bit "_x64");
+  in fetchurl {
+    url = "http://www.epsxe.com/files/ePSXe${version2}${platform}.zip";
+    sha256 = if stdenv.is64bit
+             then "16fa9qc2xhaz1f6294m0b56s5l86cbmclwm9w3mqnch0yjsrvab0"
+             else "1677lclam557kp8jwvchdrk27zfj50fqx2q9i3bcx26d9k61q3kl";
+  };
+
+  nativeBuildInputs = [ unzip wrapGAppsHook ];
+  sourceRoot = ".";
+
+  buildInputs = [
+    alsaLib
+    curl
+    gdk_pixbuf
+    glib
+    gtk3
+    libX11
+    openssl
+    ncurses5
+    SDL
+    SDL_ttf
+    stdenv.cc.cc.lib
+    zlib
+  ];
+
+  dontStrip = true;
+
+  installPhase = ''
+    install -D ${if stdenv.is64bit then "epsxe_x64" else "ePSXe"} $out/bin/epsxe
+    patchelf \
+      --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) \
+      --set-rpath ${makeLibraryPath buildInputs} \
+      $out/bin/epsxe
+  '';
+
+  meta = {
+    homepage = http://epsxe.com/;
+    description = "Enhanced PSX (PlayStation 1) emulator";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ yegortimoshenko ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/pkgs/misc/emulators/fakenes/default.nix b/pkgs/misc/emulators/fakenes/default.nix
index 6e9253b299e4..4d698563469e 100644
--- a/pkgs/misc/emulators/fakenes/default.nix
+++ b/pkgs/misc/emulators/fakenes/default.nix
@@ -1,7 +1,7 @@
 {stdenv, fetchurl, allegro, openal, mesa, zlib, hawknl, freeglut, libX11,
   libXxf86vm, libXcursor, libXpm }:
 
-stdenv.mkDerivation { 
+stdenv.mkDerivation {
   name = "fakenes-0.5.9b3";
   src = fetchurl {
     url = mirror://sourceforge/fakenes/fakenes-0.5.9-beta3.tar.gz;
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     cp fakenes $out/bin
   '';
 
-  NIX_LDFLAGS = "-lX11 -lXxf86vm -lXcursor -lXpm"; 
+  NIX_LDFLAGS = "-lX11 -lXxf86vm -lXcursor -lXpm";
 
   patches = [ ./build.patch ];
 
@@ -27,5 +27,6 @@ stdenv.mkDerivation {
     license = stdenv.lib.licenses.gpl2Plus;
     description = "Portable Open Source NES Emulator";
     platforms = stdenv.lib.platforms.linux;
+    broken = true;
   };
 }
diff --git a/pkgs/misc/emulators/mednaffe/default.nix b/pkgs/misc/emulators/mednaffe/default.nix
index 21e75a72d61c..c62d9c90ca79 100644
--- a/pkgs/misc/emulators/mednaffe/default.nix
+++ b/pkgs/misc/emulators/mednaffe/default.nix
@@ -1,28 +1,30 @@
-{ stdenv, fetchFromGitHub, pkgconfig, gtk2, mednafen }:
+{ stdenv, fetchFromGitHub, makeWrapper, autoreconfHook, pkgconfig, wrapGAppsHook
+, gtk2 ? null, gtk3 ? null, mednafen }:
 
-stdenv.mkDerivation rec {
+with stdenv.lib;
 
-  version = "0.8";
+stdenv.mkDerivation rec {
   name = "mednaffe-${version}";
+  version = "0.8.6";
 
   src = fetchFromGitHub {
-	repo = "mednaffe";
-	owner = "AmatCoder";
-	rev = "v${version}";
-	sha256 = "1j4py4ih14fa6dv0hka03rs4mq19ir83qkbxsz3695a4phmip0jr";
+    owner = "AmatCoder";
+    repo = "mednaffe";
+    rev = "v${version}";
+    sha256 = "13l7gls430dcslpan39k0ymdnib2v6crdsmn6bs9k9g30nfnqi6m";
   };
 
-  prePatch = ''
-    substituteInPlace src/mednaffe.c --replace "binpath = NULL" "binpath = g_strdup( \"${mednafen}/bin/mednafen\" )"
-  '';
+  nativeBuildInputs = [ autoreconfHook makeWrapper pkgconfig wrapGAppsHook ];
+  buildInputs = [ gtk2 gtk3 mednafen ];
 
-  buildInputs = [ pkgconfig gtk2 mednafen ];
+  configureFlags = [ (enableFeature (gtk3 != null) "gtk3") ];
+  postInstall = "wrapProgram $out/bin/mednaffe --set PATH ${mednafen}/bin";
 
-  meta = with stdenv.lib; {
-    description = "A GTK based frontend for mednafen";
+  meta = {
+    description = "GTK-based frontend for mednafen emulator";
     homepage = https://github.com/AmatCoder/mednaffe;
-    license = licenses.gpl3;
-    maintainers = [ maintainers.sheenobu ];
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ sheenobu yegortimoshenko ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/misc/emulators/ppsspp/default.nix b/pkgs/misc/emulators/ppsspp/default.nix
index ac11b574ca11..159eefad6662 100644
--- a/pkgs/misc/emulators/ppsspp/default.nix
+++ b/pkgs/misc/emulators/ppsspp/default.nix
@@ -1,37 +1,43 @@
-{ stdenv, fetchgit, zlib, libpng, qt4, qmake4Hook, pkgconfig
-, withGamepads ? true, SDL # SDL is used for gamepad functionality
-}:
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, qtbase, qtmultimedia
+, glew, libzip, snappy, zlib, withGamepads ? true, SDL2 }:
 
-assert withGamepads -> (SDL != null);
-
-let
-  version = "1.3";
-  fstat = x: fn: "-D" + fn + "=" + (if x then "ON" else "OFF");
-in
+assert withGamepads -> (SDL2 != null);
 with stdenv.lib;
-stdenv.mkDerivation rec{
-  name = "PPSSPP-${version}";
 
-  src = fetchgit {
-    url = "https://github.com/hrydgard/ppsspp.git";
-    rev = "refs/tags/v${version}";
+stdenv.mkDerivation rec {
+  name = "ppsspp-${version}";
+  version = "1.4.2";
+
+  src = fetchFromGitHub {
+    owner = "hrydgard";
+    repo = "ppsspp";
+    rev = "v${version}";
     fetchSubmodules = true;
-    sha256 = "0l8vgdlw657r8gv7rz8iqa6zd9zrbzw10pwhcnahzil7w9qrd03g";
+    sha256 = "0m4qkhx7q496sm7ibg2n7rm3npxzfr93iraxgndk0vhfk8vy8w75";
   };
 
-  buildInputs = [ zlib libpng qt4 ]
-                ++ (if withGamepads then [ SDL ] else [ ]);
+  patchPhase = ''
+    echo 'const char *PPSSPP_GIT_VERSION = "${src.rev}";' >> git-version.cpp
+    substituteInPlace UI/NativeApp.cpp --replace /usr/share $out/share
+  '';
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+  buildInputs = [ qtbase qtmultimedia glew libzip snappy zlib ]
+    ++ optionals withGamepads [ SDL2 SDL2.dev ];
 
-  nativeBuildInputs = [ pkgconfig qmake4Hook ];
+  cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" "-DUSING_QT_UI=ON" ];
 
-  qmakeFlags = [ "PPSSPPQt.pro" ];
+  installPhase = ''
+    mkdir -p $out/bin $out/share/ppsspp
+    mv PPSSPPQt $out/bin/ppsspp
+    mv assets $out/share/ppsspp
+  '';
 
-  preConfigure = "cd Qt";
-  installPhase = "mkdir -p $out/bin && cp ppsspp $out/bin";
+  enableParallelBuilding = true;
 
   meta = {
-    homepage = http://www.ppsspp.org/;
-    description = "A PSP emulator, the Qt4 version";
+    homepage = https://www.ppsspp.org/;
+    description = "A PSP emulator for Android, Windows, Mac and Linux, written in C++";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ fuuzetsu AndersonTorres ];
     platforms = platforms.linux ++ platforms.darwin ++ platforms.cygwin;
diff --git a/pkgs/misc/emulators/snes9x-gtk/default.nix b/pkgs/misc/emulators/snes9x-gtk/default.nix
index c6f4df1e5c06..f2d3abc0de3b 100644
--- a/pkgs/misc/emulators/snes9x-gtk/default.nix
+++ b/pkgs/misc/emulators/snes9x-gtk/default.nix
@@ -1,26 +1,26 @@
-{stdenv, fetchurl, nasm, SDL, zlib, libpng, ncurses, mesa, intltool, gtk2, pkgconfig, libxml2, xlibsWrapper, libpulseaudio}:
+{ stdenv, fetchFromGitHub, autoreconfHook, intltool, pkgconfig
+, SDL, zlib, gtk2, libxml2, libXv }:
 
 stdenv.mkDerivation rec {
   name = "snes9x-gtk-${version}";
-  version = "1.53";
+  version = "1.54.1";
 
-  src = fetchurl {
-    url = "http://files.ipherswipsite.com/snes9x/snes9x-${version}-src.tar.bz2";
-    sha256 = "9f7c5d2d0fa3fe753611cf94e8879b73b8bb3c0eab97cdbcb6ab7376efa78dc3";
+  src = fetchFromGitHub {
+    owner = "snes9xgit";
+    repo = "snes9x";
+    rev = version;
+    sha256 = "10fqm7lk36zj2gnx0ypps0nlws923f60b0zj4pmq9apawgx8k6rw";
   };
 
-  buildInputs = [ nasm SDL zlib libpng ncurses mesa intltool gtk2 pkgconfig libxml2 xlibsWrapper libpulseaudio];
+  nativeBuildInputs = [ autoreconfHook intltool pkgconfig ];
 
-  sourceRoot = "snes9x-${version}-src/gtk";
+  sourceRoot = "snes9x-${version}-src";
+  preAutoreconf = "cd gtk; intltoolize";  
+    
+  buildInputs = [ SDL zlib gtk2 libxml2 libXv ];
+  installPhase = "install -Dt $out/bin snes9x-gtk";
 
-  configureFlags = "--prefix=$out/ --with-opengl";
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp snes9x-gtk $out/bin
-  '';
-
-  meta = {
+  meta = with stdenv.lib; {
     description = "A portable, freeware Super Nintendo Entertainment System (SNES) emulator";
     longDescription = ''
       Snes9x is a portable, freeware Super Nintendo Entertainment System (SNES)
@@ -28,9 +28,9 @@ stdenv.mkDerivation rec {
       and Super Famicom Nintendo game systems on your PC or Workstation; which
       includes some real gems that were only ever released in Japan.
     '';
-    license = stdenv.lib.licenses.lgpl2;
-    maintainers = [ stdenv.lib.maintainers.qknight ];
+    license = licenses.lgpl2;
+    maintainers = with maintainers; [ qknight ];
     homepage = http://www.snes9x.com/;
-    platforms = stdenv.lib.platforms.linux;
+    platforms = platforms.linux;
   };
 }