about summary refs log tree commit diff
path: root/pkgs/misc/emulators
diff options
context:
space:
mode:
authorSimon Bruder <simon@sbruder.de>2021-08-11 00:19:54 +0200
committerSimon Bruder <simon@sbruder.de>2021-08-11 13:16:03 +0200
commita38b954b1b4623de3ebbdf7534731c02d37ee78d (patch)
treeec0d02c8d9c8a23c93985e838f7d3e8cc43ff48d /pkgs/misc/emulators
parent3693fbaba55aaf3627c83c071923d9d19afa2481 (diff)
fceux: 2021-01-29 -> 2.4.0
This reorganises the whole derivation because upstream switched from GTK
(optional) to Qt (required) and now uses CMake instead of SCons as build
system.
Diffstat (limited to 'pkgs/misc/emulators')
-rw-r--r--pkgs/misc/emulators/fceux/default.nix42
1 files changed, 13 insertions, 29 deletions
diff --git a/pkgs/misc/emulators/fceux/default.nix b/pkgs/misc/emulators/fceux/default.nix
index f76fc761abbcf..50e9c447f2fcc 100644
--- a/pkgs/misc/emulators/fceux/default.nix
+++ b/pkgs/misc/emulators/fceux/default.nix
@@ -1,40 +1,24 @@
-{lib, stdenv, fetchFromGitHub, scons, zlib, SDL, lua5_1, pkg-config}:
+{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, wrapQtAppsHook, SDL2, lua5_1, minizip, x264 }:
 
-stdenv.mkDerivation {
-  pname = "fceux-unstable";
-  version = "2020-01-29";
+stdenv.mkDerivation rec {
+  pname = "fceux";
+  version = "2.4.0";
 
   src = fetchFromGitHub {
     owner = "TASVideos";
-    repo = "fceux";
-    rev = "fb8d46d9697cb24b0ebe79d84eedf282f69ab337";
-    sha256 = "0gpz411dzfwx9mr34yi4zb1hphd5hha1nvwgzxki0sviwafca992";
+    repo = pname;
+    rev = "${pname}-${version}";
+    sha256 = "sha256-i0mb0vy46D97oOpAjMw3CPbG4w/LWP9YRVEMWjdYgs0=";
   };
 
-  nativeBuildInputs = [ pkg-config scons ];
-  buildInputs = [
-    zlib SDL lua5_1
-  ];
+  nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
+  buildInputs = [ SDL2 lua5_1 minizip x264 ];
 
-  sconsFlags = "OPENGL=false GTK=false CREATE_AVI=false LOGO=false";
-  prefixKey = "--prefix=";
-
-  # 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.
-  preBuild = ''
-    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"
-  '';
-
-  meta = {
+  meta = with lib; {
     description = "A Nintendo Entertainment System (NES) Emulator";
-    license = lib.licenses.gpl2;
-    maintainers = [ lib.maintainers.scubed2 ];
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ sbruder scubed2 ];
     homepage = "http://www.fceux.com/";
-    platforms = lib.platforms.linux;
+    platforms = platforms.linux;
   };
 }