summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2014-06-10 20:14:08 +0200
committerVladimír Čunát <vcunat@gmail.com>2014-06-10 20:14:08 +0200
commitf2352f7ecfe86249c73416263b397175e8a6f06e (patch)
tree027474c621c6407a717c315894096e5f1679abfb /pkgs/misc
parent5a98b9f5140578d8cbd4db8bddfe01e24249c2a9 (diff)
parentbd7f3fbf0f1294e5b32caacbfa66b984aec85c5f (diff)
downloadnixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar.gz
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar.bz2
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar.lz
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar.xz
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.tar.zst
nixlib-f2352f7ecfe86249c73416263b397175e8a6f06e.zip
Merge recent master
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/emulators/fceux/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/misc/emulators/fceux/default.nix b/pkgs/misc/emulators/fceux/default.nix
new file mode 100644
index 000000000000..48860f17aaf2
--- /dev/null
+++ b/pkgs/misc/emulators/fceux/default.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, scons, zlib, SDL, lua5, pkgconfig}:
+
+stdenv.mkDerivation {
+  name = "fceux-2.2.2";
+
+  src = fetchurl {
+    url = mirror://sourceforge/fceultra/Source%20Code/2.2.2%20src/fceux-2.2.2.src.tar.gz;
+    sha256 = "1qg5bygla8ka30b7wqvq6dv84xc7pq0jspffh2jz75d1njyi2kc0";
+  };
+
+  buildInputs = [
+    scons zlib SDL lua5 pkgconfig
+  ];
+
+  phases = "unpackPhase buildPhase";
+
+  # sed allows scons to find libraries in nix.
+  # mkdir is a hack to make scons succeed.  It still doesn't
+  # actually put the files in there due to a bug in the SConstruct file.
+  # OPENGL doesn't work because fceux dlopens the library.
+  buildPhase = ''
+    sed -e 's/env *= *Environment *.*/&; env['"'"'ENV'"'"']=os.environ;/' -i SConstruct
+    export CC="gcc"
+    export CXX="g++"
+    mkdir -p "$out" "$out/share/applications" "$out/share/pixmaps"
+    scons --prefix="$out" OPENGL=false GTK=false CREATE_AVI=false LOGO=false SYSTEM_LUA=false install
+  '';
+
+  meta = {
+    description = "A Nintendo Entertainment System (NES) Emulator";
+    license = stdenv.lib.licenses.gpl2;
+    homepage = http://www.fceux.com/;
+  };
+}