about summary refs log tree commit diff
path: root/pkgs/misc/emulators
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-12-31 09:47:26 +0100
committerVladimír Čunát <vcunat@gmail.com>2015-12-31 09:53:02 +0100
commitf9f6f41bff2213e199bded515e9b66d1e5c4d7dd (patch)
tree29c5a75228e31f305f42c5b761709a186e406776 /pkgs/misc/emulators
parentbbcf127c7c9029cba43493d7d25a9d1c65d59152 (diff)
parent468f698f609e123bb0ffae67181d07ac99eb2204 (diff)
downloadnixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.gz
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.bz2
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.lz
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.xz
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.tar.zst
nixlib-f9f6f41bff2213e199bded515e9b66d1e5c4d7dd.zip
Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r--pkgs/misc/emulators/higan/0001-change-flags.diff35
-rw-r--r--pkgs/misc/emulators/higan/default.nix52
-rw-r--r--pkgs/misc/emulators/mgba/default.nix37
-rw-r--r--pkgs/misc/emulators/wine/versions.nix29
4 files changed, 100 insertions, 53 deletions
diff --git a/pkgs/misc/emulators/higan/0001-change-flags.diff b/pkgs/misc/emulators/higan/0001-change-flags.diff
new file mode 100644
index 000000000000..78f4a248c5fd
--- /dev/null
+++ b/pkgs/misc/emulators/higan/0001-change-flags.diff
@@ -0,0 +1,35 @@
+diff -rupN higan_v095-source.orig/GNUmakefile higan_v095-source/GNUmakefile
+--- higan_v095-source.orig/GNUmakefile	2015-11-04 10:28:26.173428178 +0100
++++ higan_v095-source/GNUmakefile	2015-11-04 10:28:31.752231593 +0100
+@@ -12,7 +12,8 @@ target := tomoko
+ # console := true
+ 
+ # compiler
+-flags += -I. -O3
++flags += -I. $(CXXFLAGS)
++link += $(LDFLAGS)
+ objects := libco
+ 
+ # profile-guided optimization mode
+@@ -43,7 +44,7 @@ ifeq ($(platform),windows)
+ else ifeq ($(platform),macosx)
+   flags += -march=native
+ else ifeq ($(platform),linux)
+-  flags += -march=native -fopenmp
++  flags += -fopenmp
+   link += -fopenmp
+   link += -Wl,-export-dynamic
+   link += -lX11 -lXext -ldl
+diff -rupN higan_v095-source.orig/icarus/GNUmakefile higan_v095-source/icarus/GNUmakefile
+--- higan_v095-source.orig/icarus/GNUmakefile	2015-11-04 10:28:26.186486119 +0100
++++ higan_v095-source/icarus/GNUmakefile	2015-11-04 10:28:48.755059317 +0100
+@@ -1,8 +1,8 @@
+ include ../nall/GNUmakefile
+ include ../hiro/GNUmakefile
+ 
+-flags += -I.. -O3
+-link +=
++flags += -I.. $(CXXFLAGS)
++link += $(LDFLAGS)
+ objects := obj/hiro.o obj/icarus.o
+ objects += $(if $(call streq,$(platform),windows),obj/resource.o)
diff --git a/pkgs/misc/emulators/higan/default.nix b/pkgs/misc/emulators/higan/default.nix
index 95793de98845..5d48f38abd82 100644
--- a/pkgs/misc/emulators/higan/default.nix
+++ b/pkgs/misc/emulators/higan/default.nix
@@ -1,56 +1,51 @@
 { stdenv, fetchurl
-, pkgconfig
+, p7zip, pkgconfig
 , libX11, libXv
 , udev
 , mesa, SDL
 , libao, openal, libpulseaudio
-, profile ? "performance" # Options: accuracy, balanced, performance
-, guiToolkit ? "gtk" # can be gtk or qt4
-, gtk ? null, qt4 ? null }:
-
-assert guiToolkit == "gtk" || guiToolkit == "qt4";
-assert (guiToolkit == "gtk" -> gtk != null) || (guiToolkit == "qt4" -> qt4 != null);
+, gtk, gtksourceview
+, profile ? "balanced" # Options: accuracy, balanced, performance
+}:
 
 with stdenv.lib;
 stdenv.mkDerivation rec {
 
-  name = "higan-${version}";
-  version = "094";
-  sourceName = "higan_v${version}-source";
+  name = "higan-${meta.version}";
+  sourceName = "higan_v${meta.version}-source";
 
   src = fetchurl {
-    urls = [ "http://files.byuu.org/download/${sourceName}.tar.xz" ];
-    sha256 = "06qm271pzf3qf2labfw2lx6k0xcd89jndmn0jzmnc40cspwrs52y";
+    urls = [ "http://download.byuu.org/${sourceName}.7z" ];
+    sha256 = "0yc5gwg6dq9iwi2qk3g66wn8j2l55nhdb0311jzmdsh86zcrpvqh";
     curlOpts = "--user-agent 'Mozilla/5.0'"; # the good old user-agent trick...
   };
 
+  patches = [ ./0001-change-flags.diff ];
+
   buildInputs =
-  [ pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio ]
-  ++ optionals (guiToolkit == "gtk") [ gtk ]
-  ++ optionals (guiToolkit == "qt4") [ qt4 ];
+  [ p7zip pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio gtk gtksourceview ];
+
+  unpackPhase = ''
+    7z x $src
+    sourceRoot=${sourceName}
+  '';
 
   buildPhase = ''
-    make phoenix=${guiToolkit} profile=${profile} -C ananke
-    make phoenix=${guiToolkit} profile=${profile}
+    make compiler=c++ profile=${profile} -C icarus
+    make compiler=c++ profile=${profile}
   '';
 
   installPhase = ''
-    install -dm 755 $out/share/applications $out/share/pixmaps $out/share/higan/Video\ Shaders $out/bin $out/lib
-
+    install -dm 755 $out/bin $out/share/applications $out/share/higan $out/share/pixmaps
+    install -m 755 icarus/icarus $out/bin/
+    install -m 755 out/tomoko $out/bin/
+    (cd $out/bin; ln -Ts tomoko higan) #backwards compatibility
     install -m 644 data/higan.desktop $out/share/applications/
     install -m 644 data/higan.png $out/share/pixmaps/
-    cp -dr --no-preserve=ownership profile/* data/cheats.bml $out/share/higan/
-    cp -dr --no-preserve=ownership shaders/*.shader $out/share/higan/Video\ Shaders/
-
-    install -m 755 out/higan $out/bin/higan
-    install -m 644 ananke/libananke.so $out/lib/libananke.so.1
-    (cd $out/lib && ln -s libananke.so.1 libananke.so)
+    cp -dr --no-preserve='ownership' profile/* data/cheats.bml $out/share/higan/
   '';
 
   fixupPhase = ''
-    oldRPath=$(patchelf --print-rpath $out/bin/higan)
-    patchelf --set-rpath $oldRPath:$out/lib $out/bin/higan
-
     # A dirty workaround, suggested by @cpages:
     # we create a first-run script to populate
     # the local $HOME with all the auxiliary
@@ -67,6 +62,7 @@ stdenv.mkDerivation rec {
   '';
 
   meta = {
+    version = "096";
     description = "An open-source, cycle-accurate Nintendo multi-system emulator";
     longDescription = ''
       Higan (formerly bsnes) is a Nintendo multi-system emulator.
diff --git a/pkgs/misc/emulators/mgba/default.nix b/pkgs/misc/emulators/mgba/default.nix
index 82f106889481..ea11e3a33e2b 100644
--- a/pkgs/misc/emulators/mgba/default.nix
+++ b/pkgs/misc/emulators/mgba/default.nix
@@ -1,24 +1,41 @@
-{ stdenv, fetchurl, cmake, ffmpeg, imagemagick, libzip, pkgconfig, qt5, SDL2 }:
+{ stdenv, fetchurl, pkgconfig, cmake, ffmpeg, imagemagick, libzip, SDL2
+, qtbase, qtmultimedia }:
 
 stdenv.mkDerivation rec {
-  name = "mgba-0.3.0";
+  name = "mgba-${meta.version}";
   src = fetchurl {
-    url = https://github.com/mgba-emu/mgba/archive/0.3.0.tar.gz;
-    sha256 = "02zz6bdcwr1fx7i7dacff0s8mwp0pvabycp282qvhhx44x44q7fm";
+    url = "https://github.com/mgba-emu/mgba/archive/${meta.version}.tar.gz";
+    sha256 = "0z52w4dkgjjviwi6w13gls082zclljgx1sa8nlyb1xcnnrn6980l";
   };
 
   buildInputs = [
-    cmake ffmpeg imagemagick libzip pkgconfig qt5.base qt5.multimedia
-    SDL2
+    pkgconfig cmake ffmpeg imagemagick libzip SDL2
+    qtbase qtmultimedia
   ];
 
   enableParallelBuilding = true;
 
-  meta = {
-    homepage = https://endrist.com/mgba/;
+  meta = with stdenv.lib; {
+    version = "0.3.1";
+    homepage = https://mgba.io;
     description = "A modern GBA emulator with a focus on accuracy";
-    license = stdenv.lib.licenses.mpl20;
-    maintainers = with stdenv.lib.maintainers; [ MP2E ];
+    longDescription = ''
+      mGBA is a new Game Boy Advance emulator written in C.
+
+      The project started in April 2013 with the goal of being fast
+      enough to run on lower end hardware than other emulators
+      support, without sacrificing accuracy or portability. Even in
+      the initial version, games generally play without problems. It
+      is loosely based on the previous GBA.js emulator, although very
+      little of GBA.js can still be seen in mGBA.
+
+      Other goals include accurate enough emulation to provide a
+      development environment for homebrew software, a good workflow
+      for tool-assist runners, and a modern feature set for emulators
+      that older emulators may not support.
+    '';
+    license = licenses.mpl20;
+    maintainers = with maintainers; [ MP2E AndersonTorres ];
   };
 }
 
diff --git a/pkgs/misc/emulators/wine/versions.nix b/pkgs/misc/emulators/wine/versions.nix
index bfdbd0177da6..057f5214aa2e 100644
--- a/pkgs/misc/emulators/wine/versions.nix
+++ b/pkgs/misc/emulators/wine/versions.nix
@@ -1,27 +1,26 @@
-{
-  unstable = {
-    wineVersion = "1.8-rc3";
-    wineSha256  = "0j65v0jr1z56p9g16c0412ssx44zif8gfna7a6m865wz8gs1fnm6";
+rec {
+  stable = {
+    wineVersion = "1.8";
+    wineSha256  = "1x66lzpk7v8qx57clmcq5ag7yh3mqplf1plypwghgchjh70lafzk";
+    ## see http://wiki.winehq.org/Gecko
     geckoVersion = "2.40";
     geckoSha256 = "00nkaxhb9dwvf53ij0q75fb9fh7pf43hmwx6rripcax56msd2a8s";
     gecko64Version = "2.40";
     gecko64Sha256 = "0c4jikfzb4g7fyzp0jcz9fk2rpdl1v8nkif4dxcj28nrwy48kqn3";
+    ## see http://wiki.winehq.org/Mono
     monoVersion = "4.5.6";
     monoSha256 = "09dwfccvfdp3walxzp6qvnyxdj2bbyw9wlh6cxw2sx43gxriys5c";
   };
-  stable = {
-    wineVersion = "1.6.2";
-    wineSha256  = "1gmc0ljgfz3qy50mdxcwwjcr2yrpz54jcs2hdszsrk50wpnrxazh";
-    geckoVersion = "2.21";
-    geckoSha256 = "1n0zccnvchkg0m896sjx5psk4bxw9if32xyxib1rbfdasykay7zh";
-    gecko64Version = "2.21";
-    gecko64Sha256 = "0grc86dkq90i59zw43hakh62ra1ajnk11m64667xjrlzi7f0ndxw";
-    monoVersion = "4.5.6";
-    monoSha256 = "09dwfccvfdp3walxzp6qvnyxdj2bbyw9wlh6cxw2sx43gxriys5c";
+  unstable = {
+    inherit (stable)
+      wineVersion wineSha256
+      geckoVersion geckoSha256
+      gecko64Version gecko64Sha256
+      monoVersion monoSha256;
   };
   staging = {
-    version = "1.8-rc3";
-    sha256 = "1jp91w4sn10ycd21rwqsgxmpr425r4in4d2g085dhiw6g57ixfnj";
+    version = unstable.wineVersion;
+    sha256 = "1mi2nk5cjgfrkv8g082d4klniz1dprmvvida8c30qf2j4jykn3vb";
   };
   winetricks = {
     version = "20151116";